udp test: prefer nc over netcat syntax

sles 12 systems have netcat symlinked to nc and so expect nc syntax for netcat.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
This commit is contained in:
Sven Nierlein 2017-03-12 22:54:04 +01:00
parent e90c63712e
commit 77aa6d4ebf

View file

@ -34,12 +34,12 @@ my $nc;
if(system("which nc.traditional >/dev/null 2>&1") == 0) {
$nc = 'nc.traditional -w 3 -l -u -p 3333';
}
elsif(system("which netcat >/dev/null 2>&1") == 0) {
$nc = 'netcat -w 3 -l -u -p 3333';
}
elsif(system("which nc >/dev/null 2>&1") == 0) {
$nc = 'nc -w 3 -l -u -4 localhost 3333';
}
elsif(system("which netcat >/dev/null 2>&1") == 0) {
$nc = 'netcat -w 3 -l -u -p 3333';
}
SKIP: {
skip "solaris netcat does not listen to udp", 6 if $^O eq 'solaris';