MTU ping test
Change-Id: I0431ff169ad2871e0de1fe9ace6be7d452d274bb
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/standby_bmc.robot b/extended/standby_bmc.robot
index 46f4b00..4996532 100644
--- a/extended/standby_bmc.robot
+++ b/extended/standby_bmc.robot
@@ -41,9 +41,16 @@
Run Keyword And Ignore Error Powercycle System Via PDU
- Wait For Host To Ping ${OPENBMC_HOST} 2 mins
- Run Keyword And Ignore Error
- ... Open Connection And Log In host=${OPENBMC_HOST}
+ ${ping_status}= Run Keyword And Return Status
+ ... Wait For Host To Ping ${OPENBMC_HOST} 2 mins
+
+ # Check if the ping works using 1400 MTU.
+ Run Keyword if ${ping_status} == ${True} MTU Ping Test
+
+ Run Keyword if ${ping_status} == ${False}
+ ... Fail ${OPENBMC_HOST} ping test failed.
+
+ Open Connection And Log In host=${OPENBMC_HOST}
Wait Until Keyword Succeeds
... 1 min 30 sec Initialize OpenBMC
@@ -131,3 +138,16 @@
Should Not Be Empty ${PDU_SLOT_NO}
Should Not Be Empty ${PDU_USERNAME}
Should Not Be Empty ${PDU_PASSWORD}
+
+
+MTU Ping Test
+ [Documentation] Ping test using MTU.
+ [Arguments] ${mtu}=${1400}
+
+ # Description of argument(s):
+ # mtu The maximum transmission unit (MTU) of a network interface.
+
+ ${rc} ${output}= Run And Return RC And Output
+ ... ping -M do -s ${mtu} -c 10 ${OPENBMC_HOST}
+ Should Be Equal As Integers ${rc} 0
+ Should Not Contain ${output} 100% packet loss