summary refs log tree commit diff
path: root/nixos/modules/testing/test-instrumentation.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-05-10 08:10:19 +0200
committeraszlig <aszlig@nix.build>2018-05-10 08:21:20 +0200
commitfb9f5e4a0322da74201145a3ecbc816525972ab3 (patch)
treeaab6c1011a0d161628d0d1deafb767d116bfd57a /nixos/modules/testing/test-instrumentation.nix
parente659c324484aa610c84ca76424b0e17502789e8c (diff)
downloadnixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar.gz
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar.bz2
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar.lz
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar.xz
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.tar.zst
nixpkgs-fb9f5e4a0322da74201145a3ecbc816525972ab3.zip
nixos/testing: Fix output of systemd messages
Regression introduced by d4468bedb52bf03ff125d721634f83604bddd589.

No systemd messages are shown anymore during VM test runs, which is not
very helpful if you want to find out about failures.

There is a bit of a conflict between testing and the change that
introduced the regression. While the mentioned commit makes sure that
the primary console is tty0 for virtualisation.graphics = false, our VM
tests need to have the serial console as primary console.

So in order to support both, I added a new virtualisation.qemu.consoles
option, which allows to specify those options using the module system.

The default of this option is to use the changes that were introduced
and in test-instrumentation.nix we use only the serial console the same
way as before.

For test-instrumentation.nix I didn't add a baudrate to the serial
console because I can't find a reason on top of my head why it should
need it. There also wasn't a reason stated when that was introduced in
7499e4a5b917227696b7292ae1bd728d6b1978b0.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @flokli, @dezgeg, @edolstra
Diffstat (limited to 'nixos/modules/testing/test-instrumentation.nix')
-rw-r--r--nixos/modules/testing/test-instrumentation.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index 41dec2af9ed..98da55ed68a 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -58,6 +58,9 @@ in
     systemd.services."serial-getty@${qemuSerialDevice}".enable = false;
     systemd.services."serial-getty@hvc0".enable = false;
 
+    # Only use a serial console, no TTY.
+    virtualisation.qemu.consoles = [ qemuSerialDevice ];
+
     boot.initrd.preDeviceCommands =
       ''
         echo 600 > /proc/sys/kernel/hung_task_timeout_secs