On 11/14/2013 11:38 AM, Vincent Hsu wrote:
> The netstat command will return nozero on Ubuntu 12.04 even if
> execution success.
>
> for example:
> in Ubuntu
> $ netstat -s 1>/dev/null 2>&1 ; echo $?
> 1
> in CentOS
> $ netstat -s 1>/dev/null 2>&1 ; echo $?
> 0
>
> Signed-off-by: Vincent Hsu <[email protected]>
This should be a bug in netstat @ Ubuntu I guess?
Caspar
> ---
> testcases/network/tcp_cmds/netstat/netstat01 | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/testcases/network/tcp_cmds/netstat/netstat01
> b/testcases/network/tcp_cmds/netstat/netstat01
> index 3c2d1bb..6d4682a 100755
> --- a/testcases/network/tcp_cmds/netstat/netstat01
> +++ b/testcases/network/tcp_cmds/netstat/netstat01
> @@ -58,7 +58,8 @@ do_test() {
> while [ $TST_COUNT -le $NUMLOOPS ]; do
>
> for flag in "-s" "-rn" "-i" "-gn" "-apn"; do
> - if ! netstat $flag 1>/dev/null 2>&1; then
> + var=$(netstat $flag 1>/dev/null 2>&1);
> + if [ "$var" != "" ]; then
> end_testcase "netstat $flag failed"
> fi
> done
> --
> 1.7.9.5
>
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list