[Fuego] [PATCH 14/33] Add test case of command ping.

Wang Mingyu wangmy at cn.fujitsu.com
Wed May 8 08:00:22 UTC 2019


This test case is used to ping the host and stop after sending count 2 packets.

Signed-off-by: Wang Mingyu <wangmy at cn.fujitsu.com>
---
 tests/Functional.misc/tests/iputils_ping.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 tests/Functional.misc/tests/iputils_ping.sh

diff --git a/tests/Functional.misc/tests/iputils_ping.sh b/tests/Functional.misc/tests/iputils_ping.sh
new file mode 100644
index 0000000..b879aa9
--- /dev/null
+++ b/tests/Functional.misc/tests/iputils_ping.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#  In target, run comannd ping.
+
+test="ping"
+
+if ping -c 2 $test_tcpip_host | grep -E "PING|icmp_seq=1|icmp_seq=2"
+then
+    echo " -> $test: TEST-PASS"
+else
+    echo " -> $test: TEST-FAIL"
+fi
-- 
1.8.3.1





More information about the Fuego mailing list