[LTP] [RFC PATCH v2 3/3] test_net.sh: Add checks for external commands
Alexey Kodanev
alexey.kodanev@oracle.com
Fri Feb 16 10:49:44 CET 2018
On 15.02.2018 23:47, Petr Vorel wrote:
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
...
> diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
> index fa06e0991..ffb646d87 100644
> --- a/testcases/lib/test_net.sh
> +++ b/testcases/lib/test_net.sh
> @@ -472,8 +472,10 @@ tst_netload()
>
> local sock_cmd=
> if [ "$type" = "sctp" ]; then
> + tst_check_cmds netstat
> sock_cmd="netstat -naS | grep $port | grep -q LISTEN"
> else
> + tst_check_cmds ss
> sock_cmd="ss -ln$(echo $type | head -c1) | grep -q $port"
> fi
Hi Petr,
The changes looks good, I also have a draft patch that removes the
need for a socket checks in tst_netload(), so it should fix the problem
with netstat as well. I will send it soon.
Thanks,
Alexey
More information about the ltp
mailing list