public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Wei Gao via ltp <ltp@lists.linux.it>
To: Avinesh Kumar <akumar@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] ip_tests.sh: Iprove grep count
Date: Wed, 18 Dec 2024 20:49:27 -0500	[thread overview]
Message-ID: <Z2N7pyspF1lBuSeT@wegao> (raw)
In-Reply-To: <12583012.O9o76ZdvQC@thinkpad>

On Wed, Dec 18, 2024 at 06:37:26PM +0100, Avinesh Kumar wrote:
> Hi Petr,
> 
> On Tuesday, December 17, 2024 3:50:40 PM CET Petr Vorel wrote:
> > Some systems have already defined another route with src 127.0.0.1,
> > therefore more exact pattern is needed.
> > 
> > Also 1) escape '.' (dot) in regex 2) use '-q' instead of redirecting
> > stdout to /dev/null.
> > 
> > Reported-by: Petr Cervinka <pcervinka@suse.com>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> 
> Reviewed-by: Avinesh Kumar <akumar@suse.de>
> for both the patches.
> 
> > ---
> >  testcases/network/iproute/ip_tests.sh | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/testcases/network/iproute/ip_tests.sh b/testcases/network/iproute/ip_tests.sh
> > index ee9768073f..0b1d5a85e6 100755
> > --- a/testcases/network/iproute/ip_tests.sh
> > +++ b/testcases/network/iproute/ip_tests.sh
> > @@ -179,7 +179,7 @@ test5()
> >  $ip4_addr via 127.0.0.1 dev lo
> >  	EOF
> >  
> > -	ip route show | grep "$ip4_addr via 127.0.0.1 dev lo" > tst_ip.out 2>&1
> > +	ip route show | grep "$ip4_addr via 127\.0\.0\.1 dev lo" > tst_ip\.out 2>&1
> >  	if [ $? -ne 0 ]; then
> >  		tst_res TFAIL "'ip route show' command failed"
> >  		return
> > @@ -195,7 +195,7 @@ $ip4_addr via 127.0.0.1 dev lo
> >  
> >  	ROD ip route del $ip4_addr via 127.0.0.1
> >  
> > -	ip route show | grep 127.0.0.1 > /dev/null
> > +	ip route show | grep -q "$ip4_addr via 127\.0\.0\.1 dev lo"
> >  	if [ $? -eq 0 ]; then
> >  		tst_res TFAIL "route not deleted"
> >  		return
> > 
Reviewed-by: Wei Gao <wegao@suse.com>
for both the patches.
Thanks
> 
> Regards,
> Avinesh
> 
> 

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-12-19  1:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 14:50 [LTP] [PATCH 1/2] ip_tests.sh: Iprove grep count Petr Vorel
2024-12-17 14:50 ` [LTP] [PATCH 2/2] ip_tests.sh: Update TST_NEEDS_CMDS Petr Vorel
2024-12-17 21:33 ` [LTP] [PATCH 1/2] ip_tests.sh: Iprove grep count Petr Vorel
2024-12-18 17:37 ` Avinesh Kumar
2024-12-19  1:49   ` Wei Gao via ltp [this message]
2024-12-19 13:33     ` [LTP] [PATCH 1/2] ip_tests.sh: Improve " Petr Vorel

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=Z2N7pyspF1lBuSeT@wegao \
    --to=ltp@lists.linux.it \
    --cc=akumar@suse.de \
    --cc=wegao@suse.com \
    /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