Skip to content

Commit

Permalink
nixos/tests/avahi: Fix running background command
Browse files Browse the repository at this point in the history
In NixOS#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 <[email protected]>
  • Loading branch information
aszlig committed Mar 22, 2022
1 parent a9777c1 commit de4a69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/tests/avahi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit de4a69b

Please sign in to comment.