All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib
@ 2021-08-04 12:04 Alexey Kodanev
  2021-08-04 12:04 ` [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl() Alexey Kodanev
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alexey Kodanev @ 2021-08-04 12:04 UTC (permalink / raw)
  To: ltp

bbr01, bbr02 and dctcp01 are using netem.

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
---
 testcases/network/tcp_cc/tcp_cc_lib.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/network/tcp_cc/tcp_cc_lib.sh b/testcases/network/tcp_cc/tcp_cc_lib.sh
index dff8cef19..1a6845664 100755
--- a/testcases/network/tcp_cc/tcp_cc_lib.sh
+++ b/testcases/network/tcp_cc/tcp_cc_lib.sh
@@ -6,6 +6,7 @@
 TST_NEEDS_TMPDIR=1
 TST_NEEDS_ROOT=1
 TST_NEEDS_CMDS="sysctl tc"
+TST_NEEDS_DRIVERS="sch_netem"
 
 . tst_net.sh
 
-- 
2.25.1


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

* [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl()
  2021-08-04 12:04 [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Alexey Kodanev
@ 2021-08-04 12:04 ` Alexey Kodanev
  2021-08-20 10:43   ` Petr Vorel
  2021-08-04 12:04 ` [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported() Alexey Kodanev
  2021-08-20 10:37 ` [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Petr Vorel
  2 siblings, 1 reply; 10+ messages in thread
From: Alexey Kodanev @ 2021-08-04 12:04 UTC (permalink / raw)
  To: ltp

busybox/sysctl expects -e option to be set before 'name=value'.
This can easily be fixed by splitting the string in tst_set_sysctl(),
so that 'rparam' with '-e' option is added in between.

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
---
 testcases/lib/tst_net.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 511fb7eb1..bb30c13ec 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -918,7 +918,7 @@ tst_set_sysctl()
 	local rparam=
 	[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"
 
-	tst_net_run $safe $rparam "sysctl -q -w $name=$value"
+	tst_net_run $safe $rparam "sysctl -q -w" "$name=$value"
 }
 
 tst_cleanup_rhost()
-- 
2.25.1


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

* [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported()
  2021-08-04 12:04 [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Alexey Kodanev
  2021-08-04 12:04 ` [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl() Alexey Kodanev
@ 2021-08-04 12:04 ` Alexey Kodanev
  2021-08-20 10:46   ` Petr Vorel
  2021-08-20 10:37 ` [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Petr Vorel
  2 siblings, 1 reply; 10+ messages in thread
From: Alexey Kodanev @ 2021-08-04 12:04 UTC (permalink / raw)
  To: ltp

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
---
 testcases/lib/tst_net.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index bb30c13ec..c15413a6d 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -811,7 +811,7 @@ tst_netload_compare()
 
 tst_ping_opt_unsupported()
 {
-	ping $@ 2>&1 | grep -q "invalid option"
+	ping $@ 2>&1 | grep -qE "(invalid|unrecognized) option"
 }
 
 # tst_ping -c COUNT -s MESSAGE_SIZES -p PATTERN -I IFACE -H HOST
-- 
2.25.1


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

* [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib
  2021-08-04 12:04 [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Alexey Kodanev
  2021-08-04 12:04 ` [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl() Alexey Kodanev
  2021-08-04 12:04 ` [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported() Alexey Kodanev
@ 2021-08-20 10:37 ` Petr Vorel
  2 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2021-08-20 10:37 UTC (permalink / raw)
  To: ltp

Hi Alexey,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

* [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl()
  2021-08-04 12:04 ` [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl() Alexey Kodanev
@ 2021-08-20 10:43   ` Petr Vorel
  2021-08-24 11:35     ` Alexey Kodanev
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2021-08-20 10:43 UTC (permalink / raw)
  To: ltp

Hi Alexey,

> busybox/sysctl expects -e option to be set before 'name=value'.
> This can easily be fixed by splitting the string in tst_set_sysctl(),
> so that 'rparam' with '-e' option is added in between.
Good catch.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> index 511fb7eb1..bb30c13ec 100644
> --- a/testcases/lib/tst_net.sh
> +++ b/testcases/lib/tst_net.sh
> @@ -918,7 +918,7 @@ tst_set_sysctl()
>  	local rparam=
>  	[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"

> -	tst_net_run $safe $rparam "sysctl -q -w $name=$value"
> +	tst_net_run $safe $rparam "sysctl -q -w" "$name=$value"

I wonder if it were a bit clearer if we moves all params to second arg:
	tst_net_run $safe "sysctl" "$name=$value -q -w"

Kind regards,
Petr

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

* [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported()
  2021-08-04 12:04 ` [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported() Alexey Kodanev
@ 2021-08-20 10:46   ` Petr Vorel
  2021-08-20 11:28     ` Alexey Kodanev
  0 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2021-08-20 10:46 UTC (permalink / raw)
  To: ltp

Hi Alexey,

> -	ping $@ 2>&1 | grep -q "invalid option"
> +	ping $@ 2>&1 | grep -qE "(invalid|unrecognized) option"

Which implementation needs it? Both ping from iputils and busybox report
"invalid option".

Kind regards,
Petr

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

* [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported()
  2021-08-20 10:46   ` Petr Vorel
@ 2021-08-20 11:28     ` Alexey Kodanev
  2021-08-20 12:29       ` Petr Vorel
  0 siblings, 1 reply; 10+ messages in thread
From: Alexey Kodanev @ 2021-08-20 11:28 UTC (permalink / raw)
  To: ltp

Hi Petr,
On 20.08.2021 13:46, Petr Vorel wrote:
> Hi Alexey,
> 
>> -	ping $@ 2>&1 | grep -q "invalid option"
>> +	ping $@ 2>&1 | grep -qE "(invalid|unrecognized) option"
> 
> Which implementation needs it? Both ping from iputils and busybox report
> "invalid option".
> 

It's busybox/ping that is using musl libc getopt():
misc/getopt.c:			__getopt_msg(argv[0], ": unrecognized option: ", optchar, k);

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

* [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported()
  2021-08-20 11:28     ` Alexey Kodanev
@ 2021-08-20 12:29       ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2021-08-20 12:29 UTC (permalink / raw)
  To: ltp

Hi Alexey,

> Hi Petr,
> On 20.08.2021 13:46, Petr Vorel wrote:
> > Hi Alexey,

> >> -	ping $@ 2>&1 | grep -q "invalid option"
> >> +	ping $@ 2>&1 | grep -qE "(invalid|unrecognized) option"

> > Which implementation needs it? Both ping from iputils and busybox report
> > "invalid option".


> It's busybox/ping that is using musl libc getopt():
> misc/getopt.c:			__getopt_msg(argv[0], ": unrecognized option: ", optchar, k);

Ah, thx for info.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

* [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl()
  2021-08-20 10:43   ` Petr Vorel
@ 2021-08-24 11:35     ` Alexey Kodanev
  2021-08-24 12:11       ` Petr Vorel
  0 siblings, 1 reply; 10+ messages in thread
From: Alexey Kodanev @ 2021-08-24 11:35 UTC (permalink / raw)
  To: ltp

On 20.08.2021 13:43, Petr Vorel wrote:
> Hi Alexey,
> 
>> busybox/sysctl expects -e option to be set before 'name=value'.
>> This can easily be fixed by splitting the string in tst_set_sysctl(),
>> so that 'rparam' with '-e' option is added in between.
> Good catch.
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
> ...
>> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
>> index 511fb7eb1..bb30c13ec 100644
>> --- a/testcases/lib/tst_net.sh
>> +++ b/testcases/lib/tst_net.sh
>> @@ -918,7 +918,7 @@ tst_set_sysctl()
>>  	local rparam=
>>  	[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"
> 
>> -	tst_net_run $safe $rparam "sysctl -q -w $name=$value"
>> +	tst_net_run $safe $rparam "sysctl -q -w" "$name=$value"
> 
> I wonder if it were a bit clearer if we moves all params to second arg:
> 	tst_net_run $safe "sysctl" "$name=$value -q -w"

OK, but changed to "sysctl" "-q -w $name=$value" because the other
options should also be placed before the key/value pair:

    Usage: sysctl -p [-enq] [FILE...] / [-enqaw] [KEY[=VALUE]]...


Thanks for review Petr! Applied the patches.

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

* [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl()
  2021-08-24 11:35     ` Alexey Kodanev
@ 2021-08-24 12:11       ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2021-08-24 12:11 UTC (permalink / raw)
  To: ltp

Hi Alexey,

..
> >> -	tst_net_run $safe $rparam "sysctl -q -w $name=$value"
> >> +	tst_net_run $safe $rparam "sysctl -q -w" "$name=$value"

> > I wonder if it were a bit clearer if we moves all params to second arg:
> > 	tst_net_run $safe "sysctl" "$name=$value -q -w"

> OK, but changed to "sysctl" "-q -w $name=$value" because the other
> options should also be placed before the key/value pair:

>     Usage: sysctl -p [-enq] [FILE...] / [-enqaw] [KEY[=VALUE]]...
Thanks for addressing it!

Kind regards,
Petr

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

end of thread, other threads:[~2021-08-24 12:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 12:04 [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib Alexey Kodanev
2021-08-04 12:04 ` [LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl() Alexey Kodanev
2021-08-20 10:43   ` Petr Vorel
2021-08-24 11:35     ` Alexey Kodanev
2021-08-24 12:11       ` Petr Vorel
2021-08-04 12:04 ` [LTP] [PATCH 3/3] network/tst_net.sh: extend the pattern in tst_ping_opt_unsupported() Alexey Kodanev
2021-08-20 10:46   ` Petr Vorel
2021-08-20 11:28     ` Alexey Kodanev
2021-08-20 12:29       ` Petr Vorel
2021-08-20 10:37 ` [LTP] [PATCH 1/3] network/tcp_cc: check sch_netem driver in the lib 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.