Add ssh backdoor to VM tests infrastructure.

Thanks to @dezgeg for prototype implementation, I've
cleaned it up and added documentation.
This commit is contained in:
Tuomas Tynkkynen
2018-09-26 22:17:14 +03:00
committed by Domen Kožar
parent f0e4b31eb2
commit d6e3db44cf
4 changed files with 43 additions and 3 deletions

View File

@@ -155,8 +155,10 @@ sub start {
$ENV{USE_TMPDIR} = 1;
$ENV{QEMU_OPTS} =
($self->{allowReboot} ? "" : "-no-reboot ") .
"-monitor unix:./monitor -chardev socket,id=shell,path=./shell " .
"-device virtio-serial -device virtconsole,chardev=shell " .
"-monitor unix:./monitor " .
"-chardev socket,id=shell,path=./shell -device virtio-serial -device virtconsole,chardev=shell " .
# socket backdoor, see "Debugging NixOS tests" section in NixOS manual
"-chardev socket,id=backdoor,path=./backdoor,server,nowait -device virtio-serial -device virtconsole,chardev=backdoor " .
"-device virtio-rng-pci " .
($showGraphics ? "-serial stdio" : "-nographic") . " " . ($ENV{QEMU_OPTS} || "");
chdir $self->{stateDir} or die;