From 5a5ab7cdec7b3e01ddf95f73453e9fcfdd6b986e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 27 Feb 2023 12:40:08 +0100 Subject: scripts/runqemu: move render nodes check to runqemu from selftest This will produce a more useful hint for those setting up or testing virgl headless: runqemu - ERROR - No render nodes found in /dev/dri: ['by-path', 'card0']. If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer. as qemu itself isn't helpful: alex@Zen2:/srv/storage/alex/yocto/build-64-alt$ qemu-system-x86_64 -display egl-headless qemu-system-x86_64: egl: no drm render node available qemu-system-x86_64: egl: render node init failed (From OE-Core rev: cbbada6a6c9b0a2e97f7395117dad986555f2db9) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/runtime_test.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'meta/lib/oeqa/selftest/cases/runtime_test.py') diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 13e8760a16..e32c4aff85 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -260,13 +260,6 @@ class TestImage(OESelftestTestCase): if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or distro.startswith('almalinux')): self.skipTest('virgl headless cannot be tested with %s' %(distro)) - render_hint = """If /dev/dri/renderD* is absent due to lack of suitable GPU, 'modprobe vgem' will create one suitable for mesa llvmpipe software renderer.""" - try: - content = os.listdir("/dev/dri") - if len([i for i in content if i.startswith('render')]) == 0: - self.fail("No render nodes found in /dev/dri: %s. %s" %(content, render_hint)) - except FileNotFoundError: - self.fail("/dev/dri directory does not exist; no render nodes available on this machine. %s" %(render_hint)) qemu_distrofeatures = get_bb_var('DISTRO_FEATURES', 'qemu-system-native') features = 'IMAGE_CLASSES += "testimage"\n' if 'opengl' not in qemu_distrofeatures: -- cgit v1.2.3-54-g00ecf