From de4a69b2de1f157989fb1780d89d8db004169bd1 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 21 Mar 2022 19:18:18 +0100 Subject: [PATCH] nixos/tests/avahi: Fix running background command In https://github.com/NixOS/nixpkgs/pull/142747, the implementation behind Machine.execute() has been changed to pipe all the command's output into base64 on the guest machine. Unfortunately this means that base64 is blocking until stdout is closed, which in turn means that we now need to make sure that whenever we run a program in background via "&" we also need to make sure to close stdout, which we do by redirecting stdout to stderr. Signed-off-by: aszlig --- nixos/tests/avahi.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/avahi.nix b/nixos/tests/avahi.nix index ebb46838325f..c53a95903291 100644 --- a/nixos/tests/avahi.nix +++ b/nixos/tests/avahi.nix @@ -59,7 +59,7 @@ import ./make-test-python.nix { two.succeed("test `wc -l < out` -gt 0") # More DNS-SD. - one.execute('avahi-publish -s "This is a test" _test._tcp 123 one=1 &') + one.execute('avahi-publish -s "This is a test" _test._tcp 123 one=1 >&2 &') one.sleep(5) two.succeed("avahi-browse -r -t _test._tcp | tee out >&2") two.succeed("test `wc -l < out` -gt 0")