On Tue, Feb 16, 2021 at 04:34:06PM +0000, Alex Bennée wrote: > > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > This will check virtio/vhost-user-vga & virgl are correctly initialized > > by the Linux kernel on an egl-headless display. > > > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > > --- > > tests/acceptance/virtio-gpu.py | 161 +++++++++++++++++++++++++++++++++ > > 1 file changed, 161 insertions(+) > > create mode 100644 tests/acceptance/virtio-gpu.py > > This failed when I got to master: > > 2021-02-16 14:33:46,266 qmp L0255 DEBUG| >>> {'execute': > 'qmp_capabilities'} > 2021-02-16 14:33:46,441 machine L0385 DEBUG| Error launching VM > 2021-02-16 14:33:46,441 machine L0387 DEBUG| Command: > './qemu-system-x86_64 -display none -vga none -chardev > socket,id=mon,path=/var/tmp/avo_qemu_sock_xy9ndjnm/qemu > -29492-monitor.sock -mon chardev=mon,mode=control -chardev > socket,id=console,path=/var/tmp/avo_qemu_sock_xy9ndjnm/qemu-29492-console.sock,server=on,wait=off > -serial chardev: > console -cpu host -m 2G -machine pc,accel=kvm -device virtio-vga,virgl=on > -display egl-headless -kernel > /home/alex.bennee/avocado/data/cache/by_location/892ae21f3ae7d04994d8 > 1e1c0bf204ecebe555bb/vmlinuz -initrd > /home/alex.bennee/avocado/data/cache/by_location/892ae21f3ae7d04994d81e1c0bf204ecebe555bb/initrd.img > -append printk.time=0 console=ttyS0 > rdinit=/bin/bash' > 2021-02-16 14:33:46,441 machine L0389 DEBUG| Output: > "qemu-system-x86_64: -device virtio-vga,virgl=on: Property 'virtio-vga.virgl' > not found\n" > 2021-02-16 14:33:46,441 stacktrace L0039 ERROR| > > I'm going to assume this is because the beefy server I was building on > didn't have the VirGL headers to enable this feature. In lieu of feature > probing you might have to do what I did for the plugins test: > > try: > vm.launch() > except: > # TODO: probably fails because plugins not enabled but we > # can't currently probe for the feature. > self.cancel("TCG Plugins not enabled?") > >
While this pattern is indeed an improvement over test errors, checking for "build time features" is far from a new testing requirement, and its still not properly solved. A long time ago I proposed a way to look at the Makefile variables during test time, but it had a number of shortcomings. I guess it's now time to revisit this issue. First, I'm a strong believer in limiting the *probing* that the test itself does with regards to build time features. The probing and authoritative information should already be with the build system. I'm pretty sure that meson makes it easy to grab that kind of information. Once it's understood and agreed that the build system will provide that information, the question becomes whether tests will get that information from the build system (and thus require a build tree) or if that information will be persisted in the QEMU binary and be available for introspection. Thoughts? Does this sound like something other people would be interested in? Regards, - Cleber.
signature.asc
Description: PGP signature