All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] net/tst_netload: TBROK when TST_NEEDS_TMPDIR not set
@ 2018-05-16 13:14 Petr Vorel
  2018-05-23  8:35 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2018-05-16 13:14 UTC (permalink / raw)
  To: ltp

tst_netload function uses $TST_TMPDIR therefore requires
TST_NEEDS_TMPDIR=1. It's better to tell user the reason, as current
error message was a bit misleading:

dccp_ipsec 1 TINFO: run server 'netstress -T dccp -R 500000 -B '
netstress: option requires an argument -- 'B'
-h       Prints this help
-i n     Execute test n times
-I x     Execute test for n seconds
-C ARG   Run child process with ARG arguments (used internally)
-f       Use TFO API, default is old API
-F       TCP_FASTOPEN_CONNECT socket option and standard API
-t x     Set tcp_fastopen value
-S x     Source address to bind
-g x     x - server port
-b x     x - low latency busy poll timeout
-T x     tcp (default), udp, dccp, sctp
-z       enable SO_ZEROCOPY

Client:
-H x     Server name or IP address
-l       Become client, default is server
-a x     Number of clients running in parallel
-r x     Number of client requests
-n x     Client message size
-N x     Server message size
-m x     Reply timeout in microsec.
-d x     x is a path to file where result is saved
-A x     x max payload length (generated randomly)

Server:
-R x     x requests after which conn.closed
-q x     x - TFO queue
-B x     run in background, x - process directory
tst_test.c:492: BROK: Invalid option
dccp_ipsec 1 TFAIL: server failed

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/lib/tst_net.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index b0a78e14b..644f4242c 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -480,6 +480,10 @@ tst_netload()
 	local s_replies="${TST_NETLOAD_MAX_SRV_REPLIES:-500000}"
 	local s_opts=
 
+	if [ ! "$TST_NEEDS_TMPDIR" = 1 ]; then
+		tst_brk_ TBROK "Using tst_netload requires setting TST_NEEDS_TMPDIR=1"
+	fi
+
 	OPTIND=0
 	while getopts :a:H:d:n:N:r:R:S:b:t:T:fFe:m:A: opt; do
 		case "$opt" in
-- 
2.16.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH 1/1] net/tst_netload: TBROK when TST_NEEDS_TMPDIR not set
  2018-05-16 13:14 [LTP] [PATCH 1/1] net/tst_netload: TBROK when TST_NEEDS_TMPDIR not set Petr Vorel
@ 2018-05-23  8:35 ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2018-05-23  8:35 UTC (permalink / raw)
  To: ltp

Hi,

> tst_netload function uses $TST_TMPDIR therefore requires
> TST_NEEDS_TMPDIR=1. It's better to tell user the reason, as current
> error message was a bit misleading:

> dccp_ipsec 1 TINFO: run server 'netstress -T dccp -R 500000 -B '
> netstress: option requires an argument -- 'B'

...
> +++ b/testcases/lib/tst_net.sh
> @@ -480,6 +480,10 @@ tst_netload()
>  	local s_replies="${TST_NETLOAD_MAX_SRV_REPLIES:-500000}"
>  	local s_opts=

> +	if [ ! "$TST_NEEDS_TMPDIR" = 1 ]; then
> +		tst_brk_ TBROK "Using tst_netload requires setting TST_NEEDS_TMPDIR=1"
> +	fi
> +

Pushed.


Kind regards,
Petr

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-23  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 13:14 [LTP] [PATCH 1/1] net/tst_netload: TBROK when TST_NEEDS_TMPDIR not set Petr Vorel
2018-05-23  8:35 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.