From: Caspar Zhang <caspar@casparzhang.com>
To: Vincent Hsu <vincent.hsu@linaro.org>, ltp-list@lists.sourceforge.net
Cc: linaro-networking@linaro.org
Subject: Re: [LTP] [LNG][PATCH 7/8] ltp-networking/tcp_cmds/netstat: fix netstat test
Date: Fri, 15 Nov 2013 14:27:47 +0800 [thread overview]
Message-ID: <5285BEE3.5030405@casparzhang.com> (raw)
In-Reply-To: <1384400319-30776-7-git-send-email-vincent.hsu@linaro.org>
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 <vincent.hsu@linaro.org>
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
> Ltp-list@lists.sourceforge.net
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-11-15 7:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 3:38 [LTP] [LNG][PATCH 1/8] ltp-networking: standardize test result message Vincent Hsu
2013-11-14 3:38 ` [LTP] [LNG][PATCH 2/8] ltp-networking/rpc: gave precise test name Vincent Hsu
2013-11-14 3:38 ` [LTP] [LNG][PATCH 3/8] ltp-networking/nfs: use NFSv3 by default Vincent Hsu
2013-11-14 3:38 ` [LTP] [LNG][PATCH 4/8] ltp-networking/nfs: remove absolute path for showmount Vincent Hsu
2013-11-14 3:38 ` [LTP] [LNG][PATCH 5/8] ltp-networking/nfs: fix nfsstat01 typo Vincent Hsu
2013-11-14 3:38 ` [LTP] [LNG][PATCH 6/8] ltp-networking/tcp_cmds/finger: fix finger test Vincent Hsu
2013-11-26 13:33 ` chrubis
2013-11-14 3:38 ` [LTP] [LNG][PATCH 7/8] ltp-networking/tcp_cmds/netstat: fix netstat test Vincent Hsu
2013-11-15 6:27 ` Caspar Zhang [this message]
2013-11-26 12:56 ` chrubis
2013-11-14 3:38 ` [LTP] [LNG][PATCH 8/8] ltp-networking/iproute: fix iproute test Vincent Hsu
2013-11-26 13:31 ` chrubis
2013-11-26 13:34 ` [LTP] [LNG][PATCH 1/8] ltp-networking: standardize test result message chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5285BEE3.5030405@casparzhang.com \
--to=caspar@casparzhang.com \
--cc=linaro-networking@linaro.org \
--cc=ltp-list@lists.sourceforge.net \
--cc=vincent.hsu@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox