Skip to content

Commit

Permalink
nixos/tests/hibernate: Fix netcat flags
Browse files Browse the repository at this point in the history
I'm not sure why 024b501 used -q 0
because even netcat-openbsd has the -N flag which IMO is the better way
to shutdown the socket on EOF.

Our default netcat implementation has changed once again[1] in
3c3b822 and we're now using LibreSSL's
implementation, which doesn't have a -q flag.

See #39634 for the pull request
introducing the switch.

[1]: #19982

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @matthewbauer, @dtzWill, @Mic92
  • Loading branch information
aszlig committed Apr 29, 2018
1 parent ff3fe10 commit 146cb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/tests/hibernate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import ./make-test.nix (pkgs: {
$machine->waitForShutdown;
$machine->start;
$probe->waitForUnit("network.target");
$probe->waitUntilSucceeds("echo test | nc machine 4444 -q 0");
$probe->waitUntilSucceeds("echo test | nc machine 4444 -N");
'';

})

2 comments on commit 146cb02

@matthewbauer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Looks good! Also if someone thinks there is a legit reason for using -q 0, we probably can modify https://sources.debian.org/patches/netcat-openbsd/1.105-7/0006-quit-timer.patch to apply to libressl.

@Mic92
Copy link
Member

@Mic92 Mic92 commented on 146cb02 Apr 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this netcat from debian should be actually called netcat-debian.

Please sign in to comment.