Support boot test for Host initiated reset reload
Changes:
- Added new boot test entry
- Added util code to stop PLDM service and wait for reset
Change-Id: I3ef683cfbc1b33da865157ad2bfccda5feffc3e3
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/data/boot_lists/All b/data/boot_lists/All
index c557367..50f19e2 100755
--- a/data/boot_lists/All
+++ b/data/boot_lists/All
@@ -60,6 +60,8 @@
IPMI Power Reset (mfg)
Auto Reboot
Auto Reboot (mfg)
+Host initd Reset
+Host initd Reset (mfg)
Host Reboot
Host Reboot (mfg)
RF SYS GracefulRestart
diff --git a/data/boot_table_redfish.json b/data/boot_table_redfish.json
index 3b08ab6..de1a592 100644
--- a/data/boot_table_redfish.json
+++ b/data/boot_table_redfish.json
@@ -41,7 +41,26 @@
"method": "Run External IPMI Standard Command power on -N 10 -R 1",
"lib_file_path": "ipmi_client.robot"
},
-
+ "Istep Power On": {
+ "start": {
+ "redfish": "^1$",
+ "chassis": "^Off$",
+ "boot_progress": "^None$",
+ "host": "^Disabled$"
+ },
+ "end": {
+ "redfish": "^1$",
+ "chassis": "^On$",
+ "boot_progress": "^SystemHardwareInitializationComplete|OSBootStarted|OSRunning$",
+ "host": "^Enabled$",
+ "os_ping": "^1$",
+ "os_login": "^1$",
+ "os_run_cmd": "^1$"
+ },
+ "bmc_reboot": 0,
+ "method_type": "keyword",
+ "method": "BMC Execute Command export PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE;/usr/bin/istep fork=${1}"
+ },
"Redfish Power Off": {
"start": {
"redfish": "^1$",
@@ -517,6 +536,30 @@
"method": "utils.Redfish Initiate Auto Reboot 1000",
"lib_file_path": "utils.robot"
},
+ "Host initd Reset": {
+ "start": {
+ "redfish": "^1$",
+ "chassis": "^On$",
+ "boot_progress": "^SystemHardwareInitializationComplete|OSBootStarted|OSRunning$",
+ "host": "^Enabled$",
+ "os_ping": "^1$",
+ "os_login": "^1$",
+ "os_run_cmd": "^1$"
+ },
+ "end": {
+ "redfish": "^1$",
+ "chassis": "^On$",
+ "boot_progress": "^SystemHardwareInitializationComplete|OSBootStarted|OSRunning$",
+ "host": "^Enabled$",
+ "os_ping": "^1$",
+ "os_login": "^1$",
+ "os_run_cmd": "^1$"
+ },
+ "bmc_reboot": 0,
+ "method_type": "keyword",
+ "method": "utils.Stop PLDM Service And Wait",
+ "lib_file_path": "utils.robot"
+ },
"Host Reboot": {
"start": {
"redfish": "^1$",
@@ -612,25 +655,5 @@
"method_type": "keyword",
"method": "Inject OPAL TI",
"lib_file_path": "open_power_utils.robot"
- },
- "Istep Power On": {
- "start": {
- "redfish": "^1$",
- "chassis": "^Off$",
- "boot_progress": "^None$",
- "host": "^Disabled$"
- },
- "end": {
- "redfish": "^1$",
- "chassis": "^On$",
- "boot_progress": "^SystemHardwareInitializationComplete|OSBootStarted|OSRunning$",
- "host": "^Enabled$",
- "os_ping": "^1$",
- "os_login": "^1$",
- "os_run_cmd": "^1$"
- },
- "bmc_reboot": 0,
- "method_type": "keyword",
- "method": "BMC Execute Command export PDBG_DTB=/var/lib/phosphor-software-manager/pnor/rw/DEVTREE;/usr/bin/istep fork=${1}"
}
}
diff --git a/lib/utils.robot b/lib/utils.robot
index fa00a8d..b1d2d56 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -977,3 +977,12 @@
... xyz.openbmc_project.State.Watchdog Interval t ${milliseconds}
BMC Execute Command ${cmd}
+
+Stop PLDM Service And Wait
+ [Documentation] Stop PLDM service and wait for Host to initiate reset.
+
+ BMC Execute Command systemctl stop pldmd.service
+
+ # Check if BMC is still online.
+ Wait Until Keyword Succeeds 3 min 10 sec Is BMC Unpingable
+ Wait For Host To Ping ${OPENBMC_HOST} 2 min