From 3aab228d09f356c2aa170b5d581a9bde1c90db06 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 19 Jan 2019 13:06:48 -0500 Subject: Revert "Add ssh backdoor to VM tests infrastructure." This reverts commit d6e3db44cf09d04f0a3cd5b7ccb4a5dc3b7bfaa9. See #53935 for explanations. In short, it may be causing issues with tests on the build infrastructure. --- .../manual/development/debugging-nixos-tests.xml | 37 ---------------------- nixos/doc/manual/development/nixos-tests.xml | 1 - nixos/lib/test-driver/Machine.pm | 6 ++-- nixos/modules/testing/test-instrumentation.nix | 3 +- 4 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 nixos/doc/manual/development/debugging-nixos-tests.xml diff --git a/nixos/doc/manual/development/debugging-nixos-tests.xml b/nixos/doc/manual/development/debugging-nixos-tests.xml deleted file mode 100644 index 30e58e1e3554..000000000000 --- a/nixos/doc/manual/development/debugging-nixos-tests.xml +++ /dev/null @@ -1,37 +0,0 @@ -
- Debugging NixOS tests - - - Tests may fail and infrastructure offers access to inspect machine state. - - - - To prevent test from stopping and cleaning up, insert a sleep command: - - - -$machine->succeed("sleep 84000"); - - - - As soon as machine starts run as root: - - - -nix-shell -p socat --run "socat STDIO,raw,echo=0,escape=0x11 UNIX:/tmp/nix-build-vm-test-run-*.drv-0/vm-state-machine/backdoor" - - - - You may need to find the correct path, replacing /tmp, - * or machine. - - - - Press "enter" to open up console and login as "root". After you're done, - press "ctrl-q" to exit the console. - -
diff --git a/nixos/doc/manual/development/nixos-tests.xml b/nixos/doc/manual/development/nixos-tests.xml index d068887200a9..2695082e3867 100644 --- a/nixos/doc/manual/development/nixos-tests.xml +++ b/nixos/doc/manual/development/nixos-tests.xml @@ -16,5 +16,4 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/nixos/tests">nixos/test - diff --git a/nixos/lib/test-driver/Machine.pm b/nixos/lib/test-driver/Machine.pm index c95bc548e04f..006da889671e 100644 --- a/nixos/lib/test-driver/Machine.pm +++ b/nixos/lib/test-driver/Machine.pm @@ -156,10 +156,8 @@ 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 " . - # 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 " . + "-monitor unix:./monitor -chardev socket,id=shell,path=./shell " . + "-device virtio-serial -device virtconsole,chardev=shell " . "-device virtio-rng-pci " . ($showGraphics ? "-serial stdio" : "-nographic") . " " . ($ENV{QEMU_OPTS} || ""); chdir $self->{stateDir} or die; diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index aa0db4afd978..ed4cfa7805e2 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -55,8 +55,7 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; }; systemd.services."serial-getty@hvc0".enable = false; # Only use a serial console, no TTY. - # hvc1: socket backdoor, see "Debugging NixOS tests" section in NixOS manual - virtualisation.qemu.consoles = [ "hvc1" qemuSerialDevice ]; + virtualisation.qemu.consoles = [ qemuSerialDevice ]; boot.initrd.preDeviceCommands = '' -- cgit 1.4.1