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? > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/ltp-list -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
