Enable test cases for testing host auto reboot.
What test cases are added
- Validate host quiesce state with auto reboot.
- Validate host quiesce state without auto reboot.
- Validate host quiesce state with auto reboot.
during boot.
- Validate host quiesce state without auto reboot
during boot.
Resolves openbmc/openbmc-test-automation#322
Change-Id: I098aff9344dffc036e32192bcdb80a8750be5ce6
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index dd1e061..66bf1ec 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -761,3 +761,17 @@
${core_pattern}= Execute Command On BMC
... echo '/tmp/core_%e.%p' | tee /proc/sys/kernel/core_pattern
Should Be Equal As Strings ${core_pattern} /tmp/core_%e.%p
+
+Trigger Host Watchdog Error
+ [Documentation] Inject host watchdog error using BMC.
+ [Arguments] ${milliseconds}=1000 ${sleep_time}=5s
+ # Description of arguments:
+ # milliseconds The time watchdog timer value in milliseconds (e.g. 1000 = 1 second).
+ # sleep_time Time delay for host watchdog error to get injected.
+ # Default is 5 seconds.
+
+ Execute Command On BMC
+ ... /usr/sbin/mapper call /org/openbmc/watchdog/host0 org.openbmc.Watchdog set i ${milliseconds}
+ Execute Command On BMC
+ ... /usr/sbin/mapper call /org/openbmc/watchdog/host0 org.openbmc.Watchdog start
+ Sleep ${sleep_time}