Skip to contentSkip to conversation

sefltest: disable qemu graphics

PATCH In review Mikko Rapeli 3 participants 8 messages Oct 17, 2025 – Oct 20, 2025

lore
Share & tools
lore
#0 lore raw

cover sefltest: disable qemu graphics

RFC: did not have time to properly test this, but sending this out in case this helps with current release issues

Autobuilders see failures like
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2714
and
https://autobuilder.yoctoproject.org/valkyrie/#/builders/67/builds/2630
where selftest are booting qemu which hangs, possibly due to graphics issues.

Disable graphics from selftests which do not need it. Other selftests already use runqemu with nographic.

Mikko Rapeli (5):
selftest devtool.py: disable qemu graphics selftest imagefeatures.py: disable qemu graphics selftest overlayfs.py: disable qemu graphics selftest package.py: disable qemu graphics selftest runtime_test.py: disable qemu graphics

 meta/lib/oeqa/selftest/cases/devtool.py       |  2 +-
 meta/lib/oeqa/selftest/cases/imagefeatures.py |  4 ++--
 meta/lib/oeqa/selftest/cases/overlayfs.py     | 12 ++++++------
 meta/lib/oeqa/selftest/cases/package.py       |  4 ++--
 meta/lib/oeqa/selftest/cases/runtime_test.py  | 12 ++++++------
 5 files changed, 17 insertions(+), 17 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/5 selftest devtool.py: disable qemu graphics

Test does not need it and graphics stack may introduce boot failures.

---
 meta/lib/oeqa/selftest/cases/devtool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/devtool.py +1 -1
index b92f017b81..be95e8c74a 100644
@@ -1832,7 +1832,7 @@ class DevtoolDeployTargetTests(DevtoolBase):
         result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe)
         self.assertIn('  %s' % testfile, result.output)
         # Boot the image
-        with runqemu(testimage) as qemu:
+        with runqemu(testimage, runqemuparams='nographic') as qemu:
             # Now really test deploy-target
             for extra_opt in ['', '--strip']:
                 deploy_cmd= 'devtool deploy-target -c %s root@%s %s' % (testrecipe, qemu.ip, extra_opt)
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/5 selftest imagefeatures.py: disable qemu graphics

In reply to Mikko Rapeli

Not needed by the test and graphics may introduce
boot failures.

---
 meta/lib/oeqa/selftest/cases/imagefeatures.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/imagefeatures.py +2 -2
index 87c3da228a..3109b68531 100644
@@ -36,7 +36,7 @@ class ImageFeatures(OESelftestTestCase):
         # Build a core-image-minimal
         bitbake('core-image-minimal')
 
-        with runqemu("core-image-minimal") as qemu:
+        with runqemu("core-image-minimal", runqemuparams='nographic') as qemu:
             # Attempt to ssh with each user into qemu with empty password
             for user in [self.root_user, self.test_user]:
                 ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
@@ -62,7 +62,7 @@ class ImageFeatures(OESelftestTestCase):
         # Build a core-image-minimal
         bitbake('core-image-minimal')
 
-        with runqemu("core-image-minimal") as qemu:
+        with runqemu("core-image-minimal", runqemuparams='nographic') as qemu:
             # Attempt to ssh with each user into qemu with empty password
             for user in [self.root_user, self.test_user]:
                 ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/5 selftest overlayfs.py: disable qemu graphics

In reply to Mikko Rapeli

Tests don't need it and graphics may cause boot failures.

---
 meta/lib/oeqa/selftest/cases/overlayfs.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/lib/oeqa/selftest/cases/overlayfs.py +6 -6
index 580fbdcb9c..b40e738f80 100644
@@ -181,7 +181,7 @@ EOT
 
         bitbake('core-image-minimal')
 
-        with runqemu('core-image-minimal') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic') as qemu:
             # Check that application service started
             status, output = qemu.run_serial("systemctl status my-application")
             self.assertTrue("active (exited)" in output, msg=output)
@@ -360,7 +360,7 @@ OVERLAYFS_ROOTFS_TYPE = "ext4"
 
         bitbake('core-image-minimal')
 
-        with runqemu('core-image-minimal', image_fstype='wic') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic', image_fstype='wic') as qemu:
             status, output = qemu.run_serial("/bin/mount")
 
             line = getline_qemu(output, "upperdir=/data/overlay-etc/upper")
@@ -399,7 +399,7 @@ OVERLAYFS_ROOTFS_TYPE = "ext4"
         bitbake('core-image-minimal')
         testFile = "/etc/my-test-data"
 
-        with runqemu('core-image-minimal', image_fstype='wic', discard_writes=False) as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic', image_fstype='wic', discard_writes=False) as qemu:
             status, output = qemu.run_serial("/bin/mount")
 
             line = getline_qemu(output, "/dev/sda3")
@@ -420,7 +420,7 @@ OVERLAYFS_ROOTFS_TYPE = "ext4"
             self.assertTrue(line and line.startswith(testFile), msg=output)
 
         # Check that file exists in /etc after reboot
-        with runqemu('core-image-minimal', image_fstype='wic') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic', image_fstype='wic') as qemu:
             status, output = qemu.run_serial("ls -1 " + testFile)
             line = getline_qemu(output, testFile)
             self.assertTrue(line and line.startswith(testFile), msg=output)
@@ -454,7 +454,7 @@ IMAGE_INSTALL:append = " overlayfs-user"
         self.append_config(configLower)
         bitbake('core-image-minimal')
 
-        with runqemu('core-image-minimal', image_fstype='wic') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic', image_fstype='wic') as qemu:
             status, output = qemu.run_serial("echo \"Modified in upper\" > /etc/" + testFile)
             status, output = qemu.run_serial("diff /etc/" + testFile + " /data/overlay-etc/lower/" + testFile)
             line = getline_qemu(output, "Modified in upper")
@@ -500,7 +500,7 @@ IMAGE_INSTALL:append = " overlayfs-user"
 
         res = bitbake('core-image-minimal')
 
-        with runqemu('core-image-minimal', image_fstype='wic') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic', image_fstype='wic') as qemu:
             for filename in ("rootfs", "delayed-a", "delayed-b"):
                 status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
                 self.assertIn("found", output, "%s was not present on boot" % filename)
Signature · 1 line
2.34.1
#4 lore raw

PATCH 4/5 selftest package.py: disable qemu graphics

In reply to Mikko Rapeli

Test does not need it and graphics can cause boot failures.

---
 meta/lib/oeqa/selftest/cases/package.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/package.py +2 -2
index 38ed7173fe..fdf7ad0879 100644
@@ -177,7 +177,7 @@ class PackageTests(OESelftestTestCase):
             self.logger.error("GDB result:\n%d: %s", status, output)
             return False
 
-        with runqemu('core-image-minimal') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic') as qemu:
             for binary in ['/usr/bin/hello1',
                            '/usr/bin/hello2',
                            '/usr/libexec/hello3',
@@ -202,7 +202,7 @@ class PackageTests(OESelftestTestCase):
                 self.fail("Cannot parse output: " + output)
 
         sysconfdir = get_bb_var('sysconfdir', 'selftest-chown')
-        with runqemu('core-image-minimal') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic') as qemu:
             for path in [ sysconfdir + "/selftest-chown/file",
                           sysconfdir + "/selftest-chown/dir",
                           sysconfdir + "/selftest-chown/symlink",
Signature · 1 line
2.34.1
#5 lore raw

PATCH 5/5 selftest runtime_test.py: disable qemu graphics

In reply to Mikko Rapeli

Tests don't need it and graphics can cause boot failures.

---
 meta/lib/oeqa/selftest/cases/runtime_test.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/lib/oeqa/selftest/cases/runtime_test.py +6 -6
index d58ffa80f5..8f99bcd4cb 100644
@@ -42,7 +42,7 @@ class TestExport(OESelftestTestCase):
         isdir = os.path.isdir(testexport_dir)
         self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % testexport_dir)
 
-        with runqemu('core-image-minimal') as qemu:
+        with runqemu('core-image-minimal', runqemuparams='nographic') as qemu:
             # Attempt to run runexported.py to perform ping test
             test_path = os.path.join(testexport_dir, "oe-test")
             data_file = os.path.join(testexport_dir, 'data', 'testdata.json')
@@ -318,7 +318,7 @@ class Postinst(OESelftestTestCase):
                 self.assertTrue(os.path.isfile(os.path.join(hosttestdir, "rootfs")),
                                 "rootfs state file was not created")
 
-                with runqemu('core-image-minimal') as qemu:
+                with runqemu('core-image-minimal', runqemuparams='nographic') as qemu:
                     # Make the test echo a string and search for that as
                     # run_serial()'s status code is useless.'
                     for filename in ("rootfs", "delayed-a", "delayed-b"):
@@ -441,7 +441,7 @@ IMAGE_INSTALL:append = " systemtap-runtime"
             systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
-            with runqemu(self.image) as qemu:
+            with runqemu(self.image, runqemuparams='nographic') as qemu:
                 cmd = "crosstap -r [email protected] -s %s/general/helloworld.stp " % systemtap_examples 
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap helloworld returned a non 0 status:%s' % result.output)
@@ -453,7 +453,7 @@ IMAGE_INSTALL:append = " systemtap-runtime"
             systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
-            with runqemu(self.image) as qemu:
+            with runqemu(self.image, runqemuparams='nographic') as qemu:
                 cmd = "crosstap -r [email protected] -s %s/process/pstree.stp" % systemtap_examples
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap pstree returned a non 0 status:%s' % result.output)
@@ -465,7 +465,7 @@ IMAGE_INSTALL:append = " systemtap-runtime"
             systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
-            with runqemu(self.image) as qemu:
+            with runqemu(self.image, runqemuparams='nographic') as qemu:
                 cmd = "crosstap -r [email protected] -s %s/process/ syscalls_by_proc.stp" % systemtap_examples
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap  syscalls_by_proc returned a non 0 status:%s' % result.output)
@@ -477,7 +477,7 @@ IMAGE_INSTALL:append = " systemtap-runtime"
             systemtap_examples = os.path.join(get_bb_var("WORKDIR","systemtap-native"), "usr/share/systemtap/examples")
             bitbake(self.image)
 
-            with runqemu(self.image) as qemu:
+            with runqemu(self.image, runqemuparams='nographic') as qemu:
                 cmd = "crosstap -r [email protected] -s %s/process/ syscalls_by_pid.stp" % systemtap_examples
                 result = runCmd(cmd)
                 self.assertEqual(0, result.status, 'crosstap  syscalls_by_pid returned a non 0 status:%s' % result.output)
Signature · 1 line
2.34.1
#6 lore raw
In reply to Mikko Rapeli

Wait. There is no actual evidence that it is graphics that is causing the problems, is it? The changes are probably okay, but I would not want to have this baseless implication in commit messages.

Alex

Quoted 40 lines · Mikko Rapeli via lists.openembedded.org

RFC: did not have time to properly test this, but sending this out in case this helps with current release issues

Autobuilders see failures like
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2714
and
https://autobuilder.yoctoproject.org/valkyrie/#/builders/67/builds/2630
where selftest are booting qemu which hangs, possibly due to graphics issues.

Disable graphics from selftests which do not need it. Other selftests already use runqemu with nographic.

Mikko Rapeli (5):
selftest devtool.py: disable qemu graphics selftest imagefeatures.py: disable qemu graphics selftest overlayfs.py: disable qemu graphics selftest package.py: disable qemu graphics selftest runtime_test.py: disable qemu graphics

 meta/lib/oeqa/selftest/cases/devtool.py       |  2 +-
 meta/lib/oeqa/selftest/cases/imagefeatures.py |  4 ++--
 meta/lib/oeqa/selftest/cases/overlayfs.py     | 12 ++++++------
 meta/lib/oeqa/selftest/cases/package.py       |  4 ++--
 meta/lib/oeqa/selftest/cases/runtime_test.py  | 12 ++++++------
 5 files changed, 17 insertions(+), 17 deletions(-)

--
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#225012): https://lists.openembedded.org/g/openembedded-core/message/225012
Mute This Topic: https://lists.openembedded.org/mt/115806216/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#7 lore raw
Quoted 4 lines · Alexander Kanavin

Wait. There is no actual evidence that it is graphics that is causing the problems, is it? The changes are probably okay, but I would not want to have this baseless implication in commit messages.

I sort of agree here. ‘nographic’ turns off the qemu display output but does not disable the virtualised graphics hardware (unlike “novga” which removes display hardware entirely).

Of course, if it’s known that there is a non-trivial overhead in actually outputting the display (which, on the AB, is to a xvfb I believe) then we can still do this.

Also, there’s an argument for nographics (or even novga) in oe-selftest so that people running it locally don’t get qemu’s popping up. Which I presume happens? My build machines have been headless for many years and I can’t even remember if oe-selftest exposes DISPLAY to the qemu at all. If it does not then nographic won’t make a difference as the output isn’t active in the first place.

Cheers,
Ross