Re: [Fuego] [PATCH 07/12] skip cases because 'netstat -s' not support

"Qiu, Tingting" <[email protected]> Thu, 30 Jul 2020 06:56:34 +0000
Newsgroups dev.linux.lists.fuego
Message-ID <68ec6fc4ff5645edb136513bf841637c@G08CNEXMBPEKD04.g08.fujitsu.local>
Hi,Tim

-----Original Message-----
From: Bird, Tim [mailto:[email protected]] 
Sent: Thursday, July 9, 2020 6:20 AM
To: Qiu, Tingting/仇 婷婷 <[email protected]>; [email protected]
Subject: RE: [Fuego] [PATCH 07/12] skip cases because 'netstat -s' not support



> -----Original Message-----
> From:  qiutt
> 
> for aarch64(m3ulcb) skip cases in net.tcp_cmds
> 
> Signed-off-by: qiutt <[email protected]>
> ---
>  tests/Functional.LTP/fuego_test.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/Functional.LTP/fuego_test.sh 
> b/tests/Functional.LTP/fuego_test.sh
> index ab4165d..2254474 100755
> --- a/tests/Functional.LTP/fuego_test.sh
> +++ b/tests/Functional.LTP/fuego_test.sh
> @@ -352,6 +352,10 @@ function test_pre_check {
>      if [ "$ARCHITECTURE" != "i386" ]; then
>          skip_tests "modify_ldt01 modify_ldt02 modify_ldt03" # Only work on i386
>      fi
> +
> +    if [ "$ARCHITECTURE" == "aarch64" ]; then
> +        skip_tests "netstat" # for net.tcp_cmds, 'netstat -s' not support
> +    fi

This isn't right.  It may be true that netstat -s is not supported on m3ulcb, but it is supported just fine on other aarch64 platforms.

What is the issue with supporting 'netstat -s' on m3ulcb?
->
The patch was made for m3ulcb, and m3ulcb used the AGL system. 
The "netstat" command used was provided by "busybox"(*1). 
The error of "netstat -s" refer to (*2).
Check the code(aarch64-agl-linux/busybox/1.29.3-r0/busybox-1.29.3/networking/netstat.c), the contents refer to (*3). 
According to the code, you can know that the netstat provided by busybox only supports the parameter "-laentuwxrWp", 
and does not support the parameter "-s".

(*1)m3ulcb:~# which netstat
/bin/netstat
m3ulcb:~# ls -al /bin/netstat
lrwxrwxrwx 1 root root 19 Feb 25  2020 /bin/netstat -> /bin/busybox.nosuid

(*2)m3ulcb:~# netstat -s
netstat: invalid option -- 's'
BusyBox v1.29.3 (2020-01-16 16:59:41 UTC) multi-call binary.
Usage: netstat [-ral] [-tuwx] [-en]

(*3)
//usage:#define netstat_trivial_usage
//usage:       "[-"IF_ROUTE("r")"al] [-tuwx] [-en"IF_FEATURE_NETSTAT_WIDE("W")IF_FEATURE_NETSTAT_PRG("p")"]"
//usage:#define netstat_full_usage "\n\n"
//usage:       "Display networking information\n"
//usage:        IF_ROUTE(
//usage:     "\n        -r      Routing table"
//usage:        )
//usage:     "\n        -a      All sockets"
//usage:     "\n        -l      Listening sockets"
//usage:     "\n                Else: connected sockets"
//usage:     "\n        -t      TCP sockets"
//usage:     "\n        -u      UDP sockets"
//usage:     "\n        -w      Raw sockets"
//usage:     "\n        -x      Unix sockets"
//usage:     "\n                Else: all socket types"
//usage:     "\n        -e      Other/more information"
//usage:     "\n        -n      Don't resolve names"
//usage:        IF_FEATURE_NETSTAT_WIDE(
//usage:     "\n        -W      Wide display"
//usage:        )
//usage:        IF_FEATURE_NETSTAT_PRG(
//usage:     "\n        -p      Show PID/program name for sockets"
//usage:        )

#define NETSTAT_OPTS "laentuwx" \
        IF_ROUTE(               "r") \
        IF_FEATURE_NETSTAT_WIDE("W") \
        IF_FEATURE_NETSTAT_PRG( "p")
...


Thanks,
 -- QiuTingting

>  }
> 
>  function test_build {
> --
> 2.11.0
> 
> 
> 
> _______________________________________________
> Fuego mailing list
> [email protected]
> https://lists.linuxfoundation.org/mailman/listinfo/fuego