lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  6 Oct 2021 14:47:27 +0300
From:   Leonard Crestez <cdleonard@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>, Shuah Khan <shuah@...nel.org>,
        David Ahern <dsahern@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Ido Schimmel <idosch@...dia.com>,
        Seth David Schoen <schoen@...alty.org>,
        netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout

Reduce default client timeout from 5 seconds to 500 miliseconds.
Can be overridden from environment by exporting NETTEST_CLIENT_TIMEOUT=5

Some tests need ICMP timeouts so pass an explicit -t5 for those.

Signed-off-by: Leonard Crestez <cdleonard@...il.com>
---
 tools/testing/selftests/net/fcnal-test.sh | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index e73aeb3884c5..cf5dd96bb9db 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -40,10 +40,15 @@
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
 VERBOSE=0
 
+# Use a reduced client timeout by default
+# Can be overridden by user
+NETTEST_CLIENT_TIMEOUT=${NETTEST_CLIENT_TIMEOUT:-0.5}
+export NETTEST_CLIENT_TIMEOUT
+
 NSA_DEV=eth1
 NSA_DEV2=eth2
 NSB_DEV=eth1
 NSC_DEV=eth2
 VRF=red
@@ -1076,11 +1081,11 @@ ipv4_tcp_novrf()
 	for a in ${NSA_LO_IP} 127.0.0.1
 	do
 		log_start
 		show_hint "Should fail 'No route to host' since addresses on loopback are out of device scope"
 		run_cmd nettest -s -k
-		run_cmd nettest -r ${a} -d ${NSA_DEV}
+		run_cmd nettest -r ${a} -d ${NSA_DEV} -t5
 		log_test_addr ${a} $? 1 "Global server, device client, local connection"
 	done
 
 	a=${NSA_IP}
 	log_start
@@ -1379,23 +1384,23 @@ ipv4_udp_novrf()
 	for a in ${NSA_LO_IP} 127.0.0.1
 	do
 		log_start
 		show_hint "Should fail since addresses on loopback are out of device scope"
 		run_cmd nettest -D -s -k
-		run_cmd nettest -D -r ${a} -d ${NSA_DEV}
+		run_cmd nettest -D -r ${a} -d ${NSA_DEV} -t5
 		log_test_addr ${a} $? 2 "Global server, device client, local connection"
 
 		log_start
 		show_hint "Should fail since addresses on loopback are out of device scope"
 		run_cmd nettest -D -s -k
-		run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C
+		run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C -t5
 		log_test_addr ${a} $? 1 "Global server, device send via cmsg, local connection"
 
 		log_start
 		show_hint "Should fail since addresses on loopback are out of device scope"
 		run_cmd nettest -D -s -k
-		run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S
+		run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S -t5
 		log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection"
 	done
 
 	a=${NSA_IP}
 	log_start
@@ -3443,11 +3448,11 @@ netfilter_icmp()
 
 	for a in ${NSA_IP} ${VRF_IP}
 	do
 		log_start
 		run_cmd nettest ${arg} -s -k
-		run_cmd_nsb nettest ${arg} -r ${a}
+		run_cmd_nsb nettest ${arg} -r ${a} -t5
 		log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
 	done
 }
 
 ipv4_netfilter()
@@ -3498,11 +3503,11 @@ netfilter_icmp6()
 
 	for a in ${NSA_IP6} ${VRF_IP6}
 	do
 		log_start
 		run_cmd nettest -6 -s ${arg} -k
-		run_cmd_nsb nettest -6 ${arg} -r ${a}
+		run_cmd_nsb nettest -6 ${arg} -r ${a} -t5
 		log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
 	done
 }
 
 ipv6_netfilter()
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ