If access to /dev/dri/renderD128 fails, then qemu with 3d graphics will fail to start and errors are rather cryptic like:
qemu-system-x86_64: egl: render node init failed To fix this, users likely need to * modprobe vgem * add their user to "render" group to write to /dev/dri/renderD128 If access is not available due to missing HW, driver or failing access, then skip the test: 2023-08-22 14:41:20,591 - oe-selftest - INFO - test_testimage_virgl_headless (runtime_test.TestImage) 2023-08-22 14:41:20,603 - oe-selftest - INFO - ... skipped 'Can not open "/dev/dri/renderD128" device' 2023-08-22 14:41:20,603 - oe-selftest - INFO - Can not open "/dev/dri/renderD128" device Signed-off-by: Mikko Rapeli <mikko.rap...@linaro.org> --- meta/lib/oeqa/selftest/cases/runtime_test.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 5f90bc658f..e72504773a 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -264,7 +264,8 @@ TEST_RUNQEMUPARAMS:append = " slirp" def test_testimage_virgl_headless(self): """ Summary: Check host-assisted accelerate OpenGL functionality in qemu with egl-headless frontend - Expected: 1. Check that virgl kernel driver is loaded and 3d acceleration is enabled + Expected: 1. Check that virgl kernel driver is loaded (modprobe vgem, user part of "render" group and + can open /dev/dri/renderD* device) and 3d acceleration is enabled 2. Check that kmscube demo runs without crashing. Product: oe-core Author: Alexander Kanavin <alex.kana...@gmail.com> @@ -276,6 +277,14 @@ TEST_RUNQEMUPARAMS:append = " slirp" distro.startswith('almalinux') or distro.startswith('rocky')): self.skipTest('virgl headless cannot be tested with %s' %(distro)) + # test requires vgem driver and possibly "render" group rights to access device file + render_dev = "/dev/dri/renderD128" + try: + with open(render_dev, "w") as f: + f.close() + except IOError: + self.skipTest('Can not open "%s" device' % (render_dev)) + qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') features = 'IMAGE_CLASSES += "testimage"\n' if 'opengl' not in qemu_distrofeatures: -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#186554): https://lists.openembedded.org/g/openembedded-core/message/186554 Mute This Topic: https://lists.openembedded.org/mt/100910043/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-