Post ATYEuhWTQ3f4gWPCt6 by qyliss@chaos.social
(DIR) More posts by qyliss@chaos.social
(DIR) Post #ATYEuhWTQ3f4gWPCt6 by qyliss@chaos.social
2023-03-12T19:46:26Z
0 likes, 0 repeats
I spent this weekend writing a test for the crosvm functionality Spectrum relies on (Wayland over vhost-user-gpu). crosvm upstream moves very fast, and things change/break very frequently, so it's really hard to stay up to date, and hopefully this will help. I'm especially looking forward to much easier bisects now that it won't be a manual process.#spectrumos
(DIR) Post #ATYEuiK6RXMPARcqFE by qyliss@chaos.social
2023-03-12T19:58:41Z
0 likes, 0 repeats
Testing this sounds easy, but isn't. The idea is to run a Wayland compositor, and crosvm, with a VM image that opens a Wayland window over virtio-gpu, and then check that that window is displayed in the compositor.But how do you find out when the compositor shows a new window? Sway has config hooks for it, but wlroots doesn't support software rendering in a crosvm-friendly way, which would mean the test couldn't be run in CI.#spectrumos
(DIR) Post #ATYEuiucFmZEzgi09o by qyliss@chaos.social
2023-03-12T20:01:10Z
0 likes, 0 repeats
So the solution I came up with was to use Weston, with a custom plugin that listens for the expected window appearing, and writes into a fifo when it does. The test runner can then just wait to receive data over the fifo, with a timeout in case something in the setup is broken and the window never appears.#SpectrumOS
(DIR) Post #ATYEujQsJqN6bjnlRI by qyliss@chaos.social
2023-03-12T20:27:27Z
0 likes, 0 repeats
Other things I did in this, the most productive weekend ever:• Fix logs not being stored in the Spectrum binary cache.• Sent v2 of a kernel patch to fix userspace notifications for loop device partitions.• Some new/improved documentation.:D#SpectrumOS
(DIR) Post #ATYEujyuHJasJHiwU4 by qyliss@chaos.social
2023-03-12T20:53:14Z
2 likes, 0 repeats
Here's the test I'm so proud of. There's a #NixOS test that runs #Weston and #crosvm and listens on the fifo, and the custom Weston plugin to write into the fifo when the window appears.One really cool thing about the NixOS test runner is that it can output screenshots, so I can also confirm visually that the test worked.#SpectrumOShttps://spectrum-os.org/git/spectrum/tree/release/checks/wayland?h=wayland