Skip to content

NixOS Tests: record an flv of the test#33299

Closed
grahamc wants to merge 1 commit intoNixOS:masterfrom
grahamc:flv-nixos-tests
Closed

NixOS Tests: record an flv of the test#33299
grahamc wants to merge 1 commit intoNixOS:masterfrom
grahamc:flv-nixos-tests

Conversation

@grahamc
Copy link
Member

@grahamc grahamc commented Jan 1, 2018

Motivation for this change

Sometimes tests can be hard to debug. Maybe recording an FLV from the VNC could help with that? To start, enable the recording on the flaky keymap test.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 1, 2018
@pbogdan
Copy link
Member

pbogdan commented Jan 2, 2018

/cc #32020

@grahamc
Copy link
Member Author

grahamc commented Jan 2, 2018

and more directly, cc @aszlig @vcunat

@aszlig
Copy link
Member

aszlig commented Jan 2, 2018

@grahamc: Using VNC looks like a bit of a workaround to me, because first of all the machine states will get further away from real machines, it also doesn't capture bootup and/or anything else that doesn't involve an X server and the video stream also will come with an overhead because it travels through the guest's user space.

Maybe it's a better idea to create a patch for qemu itself, like for example this one?

Regardless of that, using SPICE instead of VNC IMHO is a better option (if you don't want to patch qemu) because it doesn't have the overhead mentioned above, it's supported by QEMU using the QXL video device and also doesn't involve additional options in the virtualisation module as we can simply use a UNIX socket instead of assigning a TCP port.

@grahamc
Copy link
Member Author

grahamc commented Jan 2, 2018

it also doesn't capture bootup and/or anything else that doesn't involve an X server

This does capture boot up, and is implemented in and by qemu as a way of viewing the video output of the guest from the host. It isn't passing the VNC connection to the guest. For this reason, I think it isn't so much of a workaround and doesn't change the guest configuration in any appreciable way.

I would have liked to use a unix socket, but couldn't find a VNC recorder which supported it.

QXL would be fine, but I'm not sure it actually provides any benefits (other than unix socket support) over this patch. Am I mistaken?

Here is an example video: gsc.io/machine-0.flv

@vcunat
Copy link
Member

vcunat commented Jan 3, 2018

If it isn't enabled by default (it isn't AFAIK), the only overhead is this couple of additional packages into (test-time) closure. I'd think we can take this approach and leave improvements (QXL?) to later.

I'm actually not sure about recording the keymap tests by default. I assumed Aszlig already had understood the problem there well enough.

@grahamc grahamc changed the base branch from master to staging February 23, 2018 21:45
@grahamc grahamc changed the base branch from staging to master February 23, 2018 21:45
@grahamc grahamc changed the base branch from master to staging February 23, 2018 21:48
@grahamc grahamc changed the base branch from staging to master February 24, 2018 02:34
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 24, 2018
@grahamc
Copy link
Member Author

grahamc commented May 28, 2018

Closing in favor of that one ^

@grahamc grahamc closed this May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants