All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Xu <xu.simon@oracle.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] tcpdump01: specify interface for ping
Date: Fri, 15 Nov 2013 09:23:45 +0800	[thread overview]
Message-ID: <528577A1.1050601@oracle.com> (raw)
In-Reply-To: <1384150091-582-1-git-send-email-xu.simon@oracle.com>

Could anyone help to review?

Thanks
Simon

On 2013/11/11 14:08, Simon Xu wrote:
> Always specify interface for ping because it is possible that pings to RHOST
> can go through multiple interfaces.  Also add -q to ping.
>
> Signed-off-by: Simon Xu <xu.simon@oracle.com>
> ---
>   testcases/network/tcp_cmds/tcpdump/tcpdump01 | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/testcases/network/tcp_cmds/tcpdump/tcpdump01 b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> index 6d6d399..6296ad2 100755
> --- a/testcases/network/tcp_cmds/tcpdump/tcpdump01
> +++ b/testcases/network/tcp_cmds/tcpdump/tcpdump01
> @@ -51,7 +51,7 @@ do_setup()
>       # Find the first interface that can ping RHOST
>       IF=""
>       for i in $(netstat -i | tail -n+3 | sed '/^lo/d' | cut -f1 -d' '); do
> -        ping -I $i -c 3 $RHOST && { IF="$i"; break; }
> +        ping -I $i -c 3 -q $RHOST && { IF="$i"; break; }
>       done
>       test -z $IF && end_testcase "Could not find an interface that can ping remote host $RHOST"
>       IFNAME=${IF}
> @@ -62,7 +62,7 @@ do_setup()
>   
>   do_test()
>   {
> -    ping -f $RHOST > /dev/null 2>&1 &
> +    ping -I $IFNAME -f $RHOST > /dev/null 2>&1 &
>       if ! tcpdump -i $IFNAME -c $NUMLOOPS > $OUTFILE; then
>           end_testcase "Problems trying to launch tcpdump"
>       fi


------------------------------------------------------------------------------
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

  reply	other threads:[~2013-11-15  1:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  6:08 [LTP] [PATCH] tcpdump01: specify interface for ping Simon Xu
2013-11-15  1:23 ` Simon Xu [this message]
2013-11-20 16:14 ` 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=528577A1.1050601@oracle.com \
    --to=xu.simon@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.