From 2b5677caa342629ee42743ac92556ac8bf5e8ef9 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 24 Dec 2022 13:58:22 +0100 Subject: nixosTests.keymap: Reorder test cases to make setup more reliable I've run this test on repeat for hours, so there's reason to be hopeful. --- nixos/tests/keymap.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/tests/keymap.nix b/nixos/tests/keymap.nix index 4306a9ae2cf94..40f4762bed835 100644 --- a/nixos/tests/keymap.nix +++ b/nixos/tests/keymap.nix @@ -78,9 +78,18 @@ let with open("${pkgs.writeText "tests.json" (builtins.toJSON tests)}") as json_file: tests = json.load(json_file) + # These environments used to run in the opposite order, causing the + # following error at openvt startup. + # + # openvt: Couldn't deallocate console 1 + # + # This error did not appear in successful runs. + # I don't know the exact cause, but I it seems that openvt and X are + # fighting over the virtual terminal. This does not appear to be a problem + # when the X test runs first. keymap_environments = { - "VT Keymap": "openvt -sw --", "Xorg Keymap": "DISPLAY=:0 xterm -title testterm -class testterm -fullscreen -e", + "VT Keymap": "openvt -sw --", } machine.wait_for_x() -- cgit 1.4.1 From 562431130592150c9910b1abd5019c16c6d6fcb0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 24 Dec 2022 13:59:57 +0100 Subject: nixosTests.keymap: Remove unnecessary sleep When test-input-reader runs, it's standard input exists and will be buffered, so by the time the file exists, the standard input can already be written to. I have no reason to believe that a terminal emulator would start accepting input _after_ launching the command. I've tested this for hours in a loop without a single failure or timeout. --- nixos/tests/keymap.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'nixos') diff --git a/nixos/tests/keymap.nix b/nixos/tests/keymap.nix index 40f4762bed835..0bde21093b0a2 100644 --- a/nixos/tests/keymap.nix +++ b/nixos/tests/keymap.nix @@ -64,7 +64,6 @@ let # wait for reader to be ready machine.wait_for_file("${readyFile}") - machine.sleep(1) # send all keys for key in inputs: -- cgit 1.4.1