-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ssh backdoor to VM tests infrastructure.
Thanks to @dezgeg for prototype implementation, I've cleaned it up and added documentation. (cherry picked from commit d6e3db4) Signed-off-by: Domen Kožar <domen@dev.si>
- Loading branch information
1 parent
0e0cd2f
commit a7fa8e1
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<section xmlns="http://docbook.org/ns/docbook" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:xi="http://www.w3.org/2001/XInclude" | ||
version="5.0" | ||
xml:id="sec-debugging-nixos-tests"> | ||
<title>Debugging NixOS tests</title> | ||
|
||
<para> | ||
Tests may fail and infrastructure offers access to inspect machine state. | ||
</para> | ||
|
||
<para> | ||
To prevent test from stopping and cleaning up, insert a sleep command: | ||
</para> | ||
|
||
<programlisting> | ||
$machine->succeed("sleep 84000"); | ||
</programlisting> | ||
|
||
<para> | ||
As soon as machine starts run as root: | ||
</para> | ||
|
||
<programlisting> | ||
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" | ||
</programlisting> | ||
|
||
<para> | ||
You may need to find the correct path, replacing <literal>/tmp</literal>, <literal>*</literal> or <literal>machine</literal>. | ||
</para> | ||
|
||
<para> | ||
Press "enter" to open up console and login as "root". After you're done, press "ctrl-q" to exit the console. | ||
</para> | ||
|
||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters