[LTP] [PATCH 1/4] lib/test_net: print TPASS/TFAIL inside tst_ping()

Alexey Kodanev alexey.kodanev@oracle.com
Wed May 24 10:40:27 CEST 2017


Since there is no usage of 'expected fail' in the tests with
tst_ping() and new shell library doesn't support passing shell
functions to EXPECT_PASS, set test result inside tst_ping.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/lib/test_net.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index dae066b..2ed6fb4 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -426,9 +426,9 @@ tst_ping()
 			-s $size -i 0 > /dev/null 2>&1
 		ret=$?
 		if [ $ret -eq 0 ]; then
-			tst_resm TINFO "tst_ping IPv${TST_IPV6:-4} msg_size $size pass"
+			tst_resm TPASS "tst_ping IPv${TST_IPV6:-4} msg_size $size pass"
 		else
-			tst_resm TINFO "tst_ping IPv${TST_IPV6:-4} msg_size $size fail"
+			tst_resm TFAIL "tst_ping IPv${TST_IPV6:-4} msg_size $size fail"
 			break
 		fi
 	done
-- 
1.7.1



More information about the ltp mailing list