From 459ddaec261ae40149601e5bb487bd52936b4e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Christ?= Date: Fri, 7 Mar 2025 10:09:23 +0100 Subject: [PATCH] nixos/testing: Fix graphical tty output Prior to this commit, the graphical output of an application running during the boot process was only redirected to the serial console. Therefore, testing those applications inside the driver (eg. using `enableOCR = true` was not possible by default. Limiting the consoles to only the `qemuSerialDevice` has originally been introduced with fb9f5e4a0322da74201145a3ecbc816525972ab3 to fix journal output after the activation of both consoles have been introduced with d4468bedb52bf03ff125d721634f83604bddd589. However limiting the consoles to only `qemuSerialDevice`this is no longer necessary since 6aba98aefdc3c6aa22913a042f7519447a684372 makes sure the journal is always forwarded to the serial console used by the testing driver. This is a follow-up on https://github.com/NixOS/nixpkgs/pull/339730 --- nixos/modules/testing/test-instrumentation.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index 1436e680c7e0..073eeb7e6cbf 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -153,13 +153,10 @@ in # be set. virtualisation = lib.optionalAttrs (options ? virtualisation.qemu) { qemu = { - # Only use a serial console, no TTY. # NOTE: optionalAttrs # test-instrumentation.nix appears to be used without qemu-vm.nix, so - # we avoid defining consoles if not possible. + # we avoid defining attributes if not possible. # TODO: refactor such that test-instrumentation can import qemu-vm - # or declare virtualisation.qemu.console option in a module that's always imported - consoles = [ qemu-common.qemuSerialDevice ]; package = lib.mkDefault pkgs.qemu_test; }; };