Don't redirect stderr to /dev/null, print it in TBROK message. Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> --- testcases/lib/test_net.sh | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh index ec3366b..310d3d1 100644 --- a/testcases/lib/test_net.sh +++ b/testcases/lib/test_net.sh @@ -45,7 +45,10 @@ tst_rhost_run() post_cmd=" > /dev/null 2>&1 &" out="1> /dev/null" ;; - s) safe=1 ;; + s) + safe=1 + post_cmd=' || echo TERR' + ;; c) cmd=$OPTARG ;; u) user=$OPTARG ;; *) @@ -62,14 +65,14 @@ tst_rhost_run() local ret= if [ -n "$TST_USE_SSH" ]; then output=`ssh -n -q $user@$RHOST "sh -c \ - '$pre_cmd $cmd $post_cmd'" $out 2> /dev/null` + '$pre_cmd $cmd $post_cmd'" $out 2>&1 || echo 'TERR'` else output=`rsh -n -l $user $RHOST "sh -c \ - '$pre_cmd $cmd $post_cmd'" $out 2> /dev/null` + '$pre_cmd $cmd $post_cmd'" $out 2>&1 || echo 'TERR'` fi - ret=$? - [ "$ret" -ne 0 -a "$safe" -eq 1 ] && \ - tst_brkm TBROK "failed to run '$cmd' on '$RHOST'" + echo "$output" | grep -q 'TERR$' + [ $? -eq 0 -a "$safe" -eq 1 ] && \ + tst_brkm TBROK "failed to run '$cmd' on '$RHOST': '$output'" [ -z "$out" -a -n "$output" ] && echo "$output" -- 1.7.1 ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list