public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Simon Xu <xu.simon@oracle.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH V2] rwho01: fix getting hostnames from command output and $COUNT
Date: Wed, 06 Nov 2013 15:47:58 +0800	[thread overview]
Message-ID: <5279F42E.7080204@oracle.com> (raw)
In-Reply-To: <5278297D.5090407@oracle.com>

Could anyone help to review this and other LTP network test patches?

Thanks
Simon

On 2013/11/5 7:10, Simon Xu wrote:
> On 2013/11/5 01:20, chrubis@suse.cz wrote:
>> Hi!
>>> Fix the way the script gets hostnames from rwho/ruptime command output,
>>> and the mistake that $COUNT is used instead of $TST_COUNT in do_test().
>> The change from COUNT to TST_COUNT is pretty straightforward. Can you
>> please describe more verbosely why is the second change needed? Has the
>> output from rwho and ruptime changed over the time?
> rwho and ruptime are pretty old stuff, their output are not likely to
> have changed.  The author intended to use the awk commands to get the
> line containing the hostname, but the output of the awk commands are all
> empty strings.
>
> Thanks
> Simon
>
>>>        while [ $TST_COUNT -le $NUMLOOPS ]; do
>>>            rwho -a > $OUTFILE
>>> -        HOST=`awk "\\$2 ~ /$LHOST>/" $OUTFILE | cut -f1 -d: | sort -u`
>>> +        HOST=`grep $LHOST $OUTFILE | sed 's/[^ ]* *//; s/:.*//' | uniq`
>>>            [ "$HOST" = "$LHOST" ] || end_testcase "$LHOST is not in rwho outfile"
>>> -        HOST=`awk "\\$2 ~ /$RHOSTNAME>/" $OUTFILE | cut -f1 -d: | sort -u`
>>> +        HOST=`grep $RHOSTNAME $OUTFILE | sed 's/[^ ]* *//; s/:.*//' | uniq`
>>>            [ "$HOST" = "$RHOSTNAME" ] || end_testcase "$RHOSTNAME is not in rwho outfile"
>>>    
>>>            ruptime -a > $OUTFILE
>>> -        HOST=`awk "\\$1 ~ /$LHOST>/" $OUTFILE | sort -u`
>>> +        HOST=`grep $LHOST $OUTFILE | sed 's/ .*//' | uniq`
>>>            [ "$HOST" = "$LHOST" ] || end_testcase "$LHOST is not in ruptime outfile"
>>> -        HOST=`awk "\\$1 ~ /$RHOSTNAME>/" $OUTFILE | sort -u`
>>> +        HOST=`grep $RHOSTNAME $OUTFILE | sed 's/ .*//' | uniq`
>>>            [ "$HOST" = "$RHOSTNAME" ] || end_testcase "$RHOSTNAME is not in ruptime outfile"
>>>    
>>> -        tst_resm TINFO "Test $COUNT of $NUMLOOPS complete"
>>> +        tst_resm TINFO "Test $TST_COUNT of $NUMLOOPS complete"
>>>            incr_tst_count
>>>        done
>>>    }
>>> -- 
>>> 1.8.4.2
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Android is increasing in popularity, but the open development platform that
>>> developers love is also attractive to malware creators. Download this white
>>> paper to learn more about secure code signing practices that can help keep
>>> Android apps secure.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Ltp-list mailing list
>>> Ltp-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2013-11-06  7:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 10:19 [LTP] [PATCH] rwho01: fix getting hostnames from command output and a typo Simon Xu
2013-11-01  8:52 ` Simon Xu
2013-11-04  8:58   ` [LTP] [PATCH V2] rwho01: fix getting hostnames from command output and $COUNT Simon Xu
2013-11-04 17:20     ` chrubis
     [not found]       ` <5278297D.5090407@oracle.com>
2013-11-06  7:47         ` Simon Xu [this message]
2013-11-06 10:56         ` 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=5279F42E.7080204@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox