system-traffic: use appropriate nc options for installed version
authorLance Richardson <lrichard@redhat.com>
Fri, 22 Jan 2016 15:12:29 +0000 (10:12 -0500)
committerJoe Stringer <joe@ovn.org>
Mon, 25 Jan 2016 19:17:08 +0000 (11:17 -0800)
commitb54971f72ec6775564f26642f2696e37eabb23be
tree75cee83abed40877bf0050776d35304eb22d852d
parentbde2e7b5ffd95ff3c7c6f66f24518494702c9462
system-traffic: use appropriate nc options for installed version

Test cases using netcat ("ICMP related" and "ICMP related with NAT")
currently fail on systems using the nmap version of nc because this
version does not support the -q command-line option.

Fix this by detecting which version of netcat is is in use and
using the "--send-only" command-line option when the nmap flavor
is detected, and using "-q 1" otherwise (openbsd and traditional
versions).

Tested via "make check-kernel" on RHEL7 (nmap version of nc),
Debian 8.2 (openbsd version of nc), and Ubuntu 14.04 ("traditional" nc).

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
tests/atlocal.in
tests/system-traffic.at