Ran into an awkward case when building an OpenSUSE Leap 15.6 appliance with oem type. I have this in my config.xml:
<package name="grub2-x86_64-efi" arch="x86_64"/>
<package name="memtest86+" arch="x86_64"/>
And it's installed the files fine, including an /etc/grub.d/20_memtest86+ which adds an entry to the grub menu to run memtest.
Unfortunately, it appears to be written to check for [ -d /sys/firmware/efi ] to decide whether to exclusively install in BIOS or EFI mode (instead of installing both and then checking at boot time). I'm not sure whether it's the kiwi chroot or some other quirk of my build environment, but it looks like the directory is not found, so this results in it installing in BIOS mode only, which then doesn't work when I actually boot in EFI.
I've written a modified version of the grub.d script (and thrown it into "root") which works, so this is mostly an FYI, but I'm curious if anyone else ran into this issue. Also I probably need to figure out where upstream to send the script to, as I think it's an improvement in general.