Message ID | 20210804120446.32835-3-aleksei.kodanev@bell-sw.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/3] network/tcp_cc: check sch_netem driver in the lib | expand |
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
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);
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
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
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com> --- testcases/lib/tst_net.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)