From 8f37f2d34efacaa00c0b2020e02da7c9e4a58eb5 Mon Sep 17 00:00:00 2001 From: Jakub Libosvar Date: Mon, 2 Jan 2017 09:02:07 -0500 Subject: [PATCH] Replace nc command with ncat Ncat has better capabilities like SCTP which nc doesn't have. Change-Id: I7a3a955465aa05032ead63459191167cfe3f98bd --- neutron/tests/common/net_helpers.py | 2 +- neutron/tests/contrib/functional-testing.filters | 5 +---- tools/configure_for_func_testing.sh | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/neutron/tests/common/net_helpers.py b/neutron/tests/common/net_helpers.py index 3a095b8f38f..470a27122a1 100644 --- a/neutron/tests/common/net_helpers.py +++ b/neutron/tests/common/net_helpers.py @@ -512,7 +512,7 @@ class NetcatTester(object): return True def _spawn_nc_in_namespace(self, namespace, address, listen=False): - cmd = ['nc', address, self.dst_port] + cmd = ['ncat', address, self.dst_port] if self.protocol == self.UDP: cmd.append('-u') if listen: diff --git a/neutron/tests/contrib/functional-testing.filters b/neutron/tests/contrib/functional-testing.filters index af90e36bfc6..edc97b15e6e 100644 --- a/neutron/tests/contrib/functional-testing.filters +++ b/neutron/tests/contrib/functional-testing.filters @@ -11,10 +11,7 @@ ping_kill: KillFilter, root, ping, -2 # enable curl from namespace curl_filter: RegExpFilter, /usr/bin/curl, root, curl, --max-time, \d+, -D-, http://[0-9a-z:./-]+ -nc_filter: CommandFilter, nc, root -# netcat has different binaries depending on linux distribution -nc_kill: KillFilter, root, nc, -9 -ncbsd_kill: KillFilter, root, nc.openbsd, -9 +ncat_filter: CommandFilter, ncat, root ncat_kill: KillFilter, root, ncat, -9 ss_filter: CommandFilter, ss, root diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index 228233fec88..d9f76091382 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -224,11 +224,12 @@ function _install_post_devstack { if is_ubuntu; then install_package isc-dhcp-client - install_package netcat-openbsd + install_package nmap elif is_fedora; then install_package dhclient + install_package nmap-ncat else - exit_distro_not_supported "installing dhclient package" + exit_distro_not_supported "installing dhclient and ncat packages" fi # Installing python-openvswitch from packages is a stop-gap while