netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leonard Crestez <cdleonard@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>, Shuah Khan <shuah@kernel.org>,
	David Ahern <dsahern@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Ido Schimmel <idosch@nvidia.com>,
	Seth David Schoen <schoen@loyalty.org>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 11/11] selftests: net/fcnal: Reduce client timeout
Date: Wed,  6 Oct 2021 14:47:27 +0300	[thread overview]
Message-ID: <516043441bd13bc1e6ba7f507a04362e04c06da5.1633520807.git.cdleonard@gmail.com> (raw)
In-Reply-To: <cover.1633520807.git.cdleonard@gmail.com>

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@gmail.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


  parent reply	other threads:[~2021-10-06 11:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 11:47 [PATCH 00/11] selftests: Improve nettest and net/fcnal-test.sh Leonard Crestez
2021-10-06 11:47 ` [PATCH 01/11] selftests: net/fcnal: Fix {ipv4,ipv6}_bind not run by default Leonard Crestez
2021-10-06 14:37   ` David Ahern
2021-10-06 11:47 ` [PATCH 02/11] selftests: net/fcnal: Mark unknown -t or TESTS value as error Leonard Crestez
2021-10-06 14:37   ` David Ahern
2021-10-06 11:47 ` [PATCH 03/11] selftests: net/fcnal: Non-zero exit on failures Leonard Crestez
2021-10-06 14:37   ` David Ahern
2021-10-06 11:47 ` [PATCH 04/11] selftests: net/fcnal: Use accept_dad=0 to avoid setup sleep Leonard Crestez
2021-10-06 14:38   ` David Ahern
2021-10-06 11:47 ` [PATCH 05/11] selftests: net/fcnal: kill_procs via spin instead of sleep Leonard Crestez
2021-10-06 14:45   ` David Ahern
2021-10-06 21:16     ` Leonard Crestez
2021-10-06 11:47 ` [PATCH 06/11] selftests: net/fcnal: Do not capture do_run_cmd in verbose mode Leonard Crestez
2021-10-06 14:48   ` David Ahern
2021-10-06 11:47 ` [PATCH 07/11] selftests: nettest: Implement -k to fork after bind or listen Leonard Crestez
2021-10-06 11:47 ` [PATCH 08/11] selftests: net/fcnal: Replace sleep after server start with -k Leonard Crestez
2021-10-06 14:54   ` David Ahern
2021-10-06 21:35     ` Leonard Crestez
2021-10-07  1:22       ` David Ahern
2021-11-10 13:54         ` Leonard Crestez
2021-10-06 11:47 ` [PATCH 09/11] selftests: nettest: Convert timeout to miliseconds Leonard Crestez
2021-10-06 14:56   ` David Ahern
2021-10-06 11:47 ` [PATCH 10/11] selftests: nettest: Add NETTEST_CLIENT,SERVER}_TIMEOUT envvars Leonard Crestez
2021-10-06 14:59   ` David Ahern
2021-10-06 11:47 ` Leonard Crestez [this message]
2021-10-06 15:01   ` [PATCH 11/11] selftests: net/fcnal: Reduce client timeout David Ahern
2021-10-06 21:26     ` Leonard Crestez
2021-10-07  1:17       ` David Ahern
2021-10-07 20:52         ` Leonard Crestez
2021-10-08  3:01           ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516043441bd13bc1e6ba7f507a04362e04c06da5.1633520807.git.cdleonard@gmail.com \
    --to=cdleonard@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=schoen@loyalty.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).