support/testing: add xserver + Mesa OpenGL (GLX) + glxinfo
PATCH v3 1/2 support/testing: add xserver + Mesa OpenGL (GLX) + glxinfo
From: Romain Naour <[email protected]>
This test allow to check if the xserver with GLX is working properly. This is a basic test but it allow to trigger the current bug reported by [1].
To test if the glxinfo test is working, you can change "-display :0" by "-display :1" in the glxinfo command line.
[1] https://bugs.buildroot.org/show_bug.cgi?id=11591
index 0000000000..5a28411f49
support/testing/tests/package/test_glxinfo.py new file +66 -0
@@ -0,0 +1,66 @@ +import os + +import infra.basetest + +GLXINFO_TIMEOUT = 120 + + +class TestGlxinfo(infra.basetest.BRTest): + config = \ + """ + BR2_x86_core2=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--glibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + # BR2_TOOLCHAIN_EXTERNAL_LOCALE is not set + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config" + BR2_PACKAGE_MESA3D_DEMOS=y + BR2_PACKAGE_MESA3D=y + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y + BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y + BR2_PACKAGE_XORG7=y + BR2_PACKAGE_XSERVER_XORG_SERVER=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + BR2_TARGET_ROOTFS_EXT2=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def wait_for_xserver(self): + # xserver takes some time to start up + # The test case fail here if for some reason xserver is not properly installed + _, _ = self.emulator.run('while [ ! -e /var/run/xorg.pid ]; do sleep 1; done', 120) + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.ext2") + kern = os.path.join(self.builddir, "images", "bzImage") + # glxinfo overallocate memory and the minimum that seemed to work was 512MB + self.emulator.boot(arch="i386", + kernel=kern, + kernel_cmdline=["root=/dev/vda console=ttyS0"], + options=["-M", "pc", "-m", "512", "-drive", "file={},if=virtio,format=raw".format(img)]) + self.emulator.login() + + def test_run(self): + self.login() + self.wait_for_xserver() + + # The test case verifies that the xserver with GLX is working + cmd = "glxinfo -B -display :0" + output, exit_code = self.emulator.run(cmd, GLXINFO_TIMEOUT) + self.assertEqual(exit_code, 0) + for line in output: + self.assertNotIn("Error", line) + # Error case: "Error: couldn't find RGB GLX visual or fbconfig"
Signature · 1 line
2.17.1
PATCH v3 2/2 Generating the .gitlab-ci.yml file
From: youssef <[email protected]>
--- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+)
.gitlab-ci.yml +1 -0
@@ -325,6 +325,7 @@ tests.init.test_systemd.TestInitSystemSystemdRwNetworkd: { extends: .runtime_tes tests.package.test_atop.TestAtop: { extends: .runtime_test } tests.package.test_docker_compose.TestDockerCompose: { extends: .runtime_test } tests.package.test_dropbear.TestDropbear: { extends: .runtime_test } +tests.package.test_glxinfo.TestGlxinfo: { extends: .runtime_test } tests.package.test_ipython.TestIPythonPy2: { extends: .runtime_test } tests.package.test_ipython.TestIPythonPy3: { extends: .runtime_test } tests.package.test_lpeg.TestLuaLPeg: { extends: .runtime_test }
Signature · 1 line
2.17.1
PATCH v3 2/2 Generating the .gitlab-ci.yml file
Hello,
Quoted 3 lines · youssef.harmouch at smile.fr
From: youssef <[email protected]>
Signed-off-by youssef <[email protected]>
Thanks for your patch, but there are several problems with it:
(1) It should be squashed into the patch introducing the test
(2) The Signed-off-by line has some spurious spaces at the beginning
(3) The From: and Signed-off-by should use your complete real name (i.e first name + last name)
I will fix this up myself when applying, so these are only recommendations for future patches.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 1/2 support/testing: add xserver + Mesa OpenGL (GLX) + glxinfo
In reply to Youssef at smile.frHello,
Quoted 9 lines · youssef.harmouch at smile.fr
From: Romain Naour <[email protected]>
This test allow to check if the xserver with GLX is working properly. This is a basic test but it allow to trigger the current bug reported by [1].
To test if the glxinfo test is working, you can change "-display :0" by "-display :1" in the glxinfo command line.
Quoted 8 lines
[1] https://bugs.buildroot.org/show_bug.cgi?id=11591
Signed-off-by Romain Naour <[email protected]>Cc "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Romain Naour <[email protected]>Signed-off-by youssef <[email protected]>index 0000000000..5a28411f49
The patch was somehow damaged here, so I fixed it up, squashed PATCH 2/2 into this one, and applied.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v3 1/2 support/testing: add xserver + Mesa OpenGL (GLX) + glxinfo
Hello Thomas,
Le 11/04/2019 ? 18:24, Thomas Petazzoni a ?crit?:
Quoted 23 lines
Hello,
Quoted 9 lines · youssef.harmouch at smile.fr
From: Romain Naour <[email protected]>
This test allow to check if the xserver with GLX is working properly. This is a basic test but it allow to trigger the current bug reported by [1].
To test if the glxinfo test is working, you can change "-display :0" by "-display :1" in the glxinfo command line.
Quoted 8 lines
[1] https://bugs.buildroot.org/show_bug.cgi?id=11591
Signed-off-by Romain Naour <[email protected]>Cc "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Romain Naour <[email protected]>Signed-off-by youssef <[email protected]>index 0000000000..5a28411f49
Quoted 2 lines
The patch was somehow damaged here, so I fixed it up, squashed PATCH 2/2 into this one, and applied.
Thanks for fixing the patch.
I'll check what's going on with git format-patch on Youssef's computer.
Best regards,
Romain
Quoted 5 lines
Thanks,
Thomas