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 <aszlig@nix.build>
main
aszlig 2 years ago
parent a9777c1644
commit de4a69b2de
No known key found for this signature in database
GPG Key ID: 684089CE67EBB691
  1. 2
      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")

Loading…
Cancel
Save