On Tue, 2009-12-01 at 23:32 +0100, Jiri Palecek wrote:
> Hello,
>
> this patch fixes the following problem with awk code in rsh01. It caused the
> test to fail.
>
> The END label is executed always, even in the event of
> exit. Therefore, the "exit 1" statement was executed even when the
> line matched (as a consequence of "exit 0") and awk always returned
> 1 (ie. failure).
>
> Regards
> Jiri Palecek
>
> Signed-off-by: Jiri Palecek <[email protected]>
Thanks.
Regards--
Subrata
> ---
> testcases/network/tcp_cmds/rsh/rsh01 | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/network/tcp_cmds/rsh/rsh01
> b/testcases/network/tcp_cmds/rsh/rsh01
> index e87a6a0..0a2b58f 100755
> --- a/testcases/network/tcp_cmds/rsh/rsh01
> +++ b/testcases/network/tcp_cmds/rsh/rsh01
> @@ -72,9 +72,9 @@ do_test()
> # gcoo...@orangebox ~ $ ls -l /etc/hosts
> # -rw-r--r-- 1 root root 463 Jul 5 09:26 /etc/hosts
> #
> - echo "$OUT" | \
> - awk 'NF == 9 && $NF == "/etc/hosts" { exit 0 } END { exit 1
> }' \
> - >& /dev/null
> + echo "$OUT" |
> + awk 'BEGIN { RET=1 } NF == 9 && $NF == "/etc/hosts" { RET=0
> } END { exit RET }' \
> + > /dev/null 2>&1
>
> if [ $? -eq 0 ] ; then
> tst_resm TPASS "rsh to $RHOST test succeeded"
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list