qemu: disable SDL UI frontend
PATCH 1/2 qemu: disable SDL UI frontend
From: Alexander Kanavin <[email protected]>
For rationale please see
https://lists.openembedded.org/g/openembedded-architecture/message/2374
SDL-based UI is of limited use in typical scenarios, and can be replaced by qemu's own vnc server.
--- meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb | 2 +- meta/recipes-devtools/qemu/qemu_11.0.0.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb +1 -1
@@ -9,7 +9,7 @@ DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native python3-qemu-q EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" -PACKAGECONFIG ??= "fdt alsa kvm pie slirp png pixman sdl \ +PACKAGECONFIG ??= "fdt alsa kvm pie slirp png pixman \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ "
meta/recipes-devtools/qemu/qemu_11.0.0.bb +2 -2
@@ -16,12 +16,12 @@ EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCU EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" PACKAGECONFIG ??= " \ - fdt sdl kvm pie slirp \ + fdt kvm pie slirp \ ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ " -PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \ +PACKAGECONFIG:class-nativesdk ??= "fdt kvm pie slirp \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ " # ppc32 hosts are no longer supported in qemu
Signature · 1 line
2.47.3
PATCH 2/2 selftes: test_testimage_virgl_gtk_sdl: run only if gtk or sdl are enabled in base config
From: Alexander Kanavin <[email protected]>
The test was forcibly enabling both gtk and sdl in qemu and then running the test.
This changes the logic to skip the test if neither is enabled, and run gtk and/or sdl tests only if either is already enabled in the base config that was in place before running the selftest.
Together with disabling sdl support in qemu by default this effectively skips the test on the yocto autobuilder, resolving the selftest failures seen with qemu 11.0.
--- meta/lib/oeqa/selftest/cases/runtime_test.py | 32 +++++++++++--------- 1 file changed, 18 insertions(+), 14 deletions(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +18 -14
@@ -249,25 +249,29 @@ TEST_RUNQEMUPARAMS += " slirp" qemu_packageconfig = get_bb_var('PACKAGECONFIG', 'qemu-system-native') qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') features = 'IMAGE_CLASSES += "testimage"\n' - if 'gtk+' not in qemu_packageconfig: - features += 'PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"\n' - if 'sdl' not in qemu_packageconfig: - features += 'PACKAGECONFIG:append:pn-qemu-system-native = " sdl"\n' + + if 'gtk+' not in qemu_packageconfig and 'sdl' not in qemu_packageconfig: + self.skipTest("Neither gtk+ nor sdl enabled in qemu-system-native; the test requires at least one") + if 'opengl' not in qemu_distrofeatures: features += 'DISTRO_FEATURES:append = " opengl"\n' features += 'TEST_SUITES = "ping ssh virgl"\n' features += 'IMAGE_FEATURES:append = " ssh-server-dropbear"\n' features += 'IMAGE_INSTALL:append = " kmscube"\n' - features_gtk = features + 'TEST_RUNQEMUPARAMS += " gtk gl"\n' - self.write_config(features_gtk) - with mock.patch.dict(os.environ, {"DISPLAY": display}): - bitbake('core-image-minimal') - bitbake('-c testimage core-image-minimal') - features_sdl = features + 'TEST_RUNQEMUPARAMS += " sdl gl"\n' - self.write_config(features_sdl) - with mock.patch.dict(os.environ, {"DISPLAY": display}): - bitbake('core-image-minimal') - bitbake('-c testimage core-image-minimal') + + if 'gtk+' in qemu_packageconfig: + features_gtk = features + 'TEST_RUNQEMUPARAMS += " gtk gl"\n' + self.write_config(features_gtk) + with mock.patch.dict(os.environ, {"DISPLAY": display}): + bitbake('core-image-minimal') + bitbake('-c testimage core-image-minimal') + + if 'sdl' in qemu_packageconfig: + features_sdl = features + 'TEST_RUNQEMUPARAMS += " sdl gl"\n' + self.write_config(features_sdl) + with mock.patch.dict(os.environ, {"DISPLAY": display}): + bitbake('core-image-minimal') + bitbake('-c testimage core-image-minimal') @skipIfNotMachine("qemux86-64", "test needs qemux86-64") def test_testimage_virgl_headless(self):
Signature · 1 line
2.47.3