blob: ca7b90f3fb69c72af9ebbce7a30843aea4b86ff0 [file] [log] [blame]
George Keishing92abc992016-10-18 13:29:25 -05001*** Settings ***
2Documentation Power cycle loop. This is to test where network service
3... becomes unavailable during AC-Cycle stress test.
4
5Resource ../lib/rest_client.robot
6Resource ../lib/pdu/pdu.robot
7Resource ../lib/utils.robot
8Resource ../lib/openbmc_ffdc.robot
George Keishingca709b02017-02-02 11:38:19 -06009Resource ../lib/state_manager.robot
George Keishingbf1500d2017-10-30 12:47:47 -050010Resource ../lib/boot_utils.robot
George Keishingc26e74d2017-11-17 00:45:20 -060011Resource ../lib/code_update_utils.robot
George Keishing9867bed2018-02-04 22:31:36 -060012Library ../lib/bmc_ssh_utils.py
George Keishing92abc992016-10-18 13:29:25 -050013
George Keishing94659a22017-11-17 00:03:05 -060014Test Teardown Test Teardown Execution
George Keishingc26e74d2017-11-17 00:45:20 -060015Suite Setup Suite Setup Execution
George Keishing92abc992016-10-18 13:29:25 -050016
Igor Kanyukafeb79d62025-10-20 21:24:03 +010017Test Tags BMC_Reset_Loop
18
George Keishing92abc992016-10-18 13:29:25 -050019*** Variables ***
George Keishing397846b2020-04-28 03:55:53 -050020${LOOP_COUNT} ${50}
21${CHECK_FOR_ERRORS} ${1}
George Keishing92abc992016-10-18 13:29:25 -050022
George Keishing2c891732018-09-18 07:39:59 -050023# Error strings to check from journald.
Jian Zhangc79341b2023-03-10 18:03:52 +080024${ERROR_REGEX} SEGV|core-dump|FAILURE|Failed to start|Found ordering cycle
George Keishing2c891732018-09-18 07:39:59 -050025
George Keishing92abc992016-10-18 13:29:25 -050026*** Test Cases ***
27
George Keishingca709b02017-02-02 11:38:19 -060028Run Multiple Power Cycle
29 [Documentation] Execute multiple power cycles.
30 [Setup] Validate Parameters
31 [Tags] Run_Multiple_Power_Cycle
George Keishing92abc992016-10-18 13:29:25 -050032
George Keishingca709b02017-02-02 11:38:19 -060033 # By default run test for 50 loops, else user input iteration.
34 # Fails immediately if any of the execution rounds fail and
35 # check if BMC is still pinging and FFDC is collected.
36 Repeat Keyword ${LOOP_COUNT} times Power Cycle System Via PDU
37
38
George Keishing5d5b8a22019-09-11 13:48:54 -050039Run Multiple BMC Reset Via Redfish
George Keishingbf1500d2017-10-30 12:47:47 -050040 [Documentation] Execute multiple reboots via REST.
George Keishing5d5b8a22019-09-11 13:48:54 -050041 [Tags] Run_Multiple_BMC_Reset_Via_Redfish
George Keishingbf1500d2017-10-30 12:47:47 -050042
43 # By default run test for 50 loops, else user input iteration.
44 # Fails immediately if any of the execution rounds fail and
45 # check if BMC is still pinging and FFDC is collected.
George Keishing5d5b8a22019-09-11 13:48:54 -050046 Repeat Keyword ${LOOP_COUNT} times BMC Redfish Reset Cycle
George Keishingbf1500d2017-10-30 12:47:47 -050047
48
49Run Multiple BMC Reset Via Reboot
50 [Documentation] Execute multiple reboots via "reboot" command.
51 [Tags] Run_Multiple_BMC_Reset_Via_Reboot
George Keishingca709b02017-02-02 11:38:19 -060052
53 # By default run test for 50 loops, else user input iteration.
54 # Fails immediately if any of the execution rounds fail and
55 # check if BMC is still pinging and FFDC is collected.
56 Repeat Keyword ${LOOP_COUNT} times BMC Reboot Cycle
George Keishing92abc992016-10-18 13:29:25 -050057
58
George Keishingc9489162021-06-30 05:35:06 -050059Run Multiple BMC Reset When Host Is Booted Via Redfish
60 [Documentation] Execute multiple reboots via redfish.
61 [Tags] Run_Multiple_BMC_Reset_When_Host_Is_Booted_Via_Redfish
62
63 # By default run test for 50 loops, else user input iteration.
64 # Fails immediately if any of the execution rounds fail and
65 # check if BMC is still pinging and FFDC is collected.
66 Repeat Keyword ${LOOP_COUNT} times BMC Redfish Reset Runtime Cycle
67
George Keishing92abc992016-10-18 13:29:25 -050068*** Keywords ***
69
George Keishingca709b02017-02-02 11:38:19 -060070Power Cycle System Via PDU
71 [Documentation] Power cycle system and wait for BMC to reach Ready state.
George Keishing5d5b8a22019-09-11 13:48:54 -050072
George Keishing92abc992016-10-18 13:29:25 -050073 PDU Power Cycle
George Keishingca709b02017-02-02 11:38:19 -060074 Check If BMC Is Up 5 min 10 sec
George Keishing92abc992016-10-18 13:29:25 -050075
George Keishingca709b02017-02-02 11:38:19 -060076 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishingb39a6792017-11-10 22:58:52 -060077 Verify BMC RTC And UTC Time Drift
George Keishingca709b02017-02-02 11:38:19 -060078
79
George Keishing5d5b8a22019-09-11 13:48:54 -050080BMC Redfish Reset Cycle
81 [Documentation] Reset BMC via Redfish and verify required states.
82
83 Redfish OBMC Reboot (off)
George Keishing397846b2020-04-28 03:55:53 -050084
George Keishing5d5b8a22019-09-11 13:48:54 -050085 ${bmc_version}= Get BMC Version
George Keishing397846b2020-04-28 03:55:53 -050086 Valid Value bmc_version valid_values=['${initial_bmc_version}']
87
George Keishingd5e8d862025-05-13 21:59:19 +053088 IF '${CHECK_FOR_ERRORS}' == '${1}'
89 Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
90 END
George Keishing397846b2020-04-28 03:55:53 -050091
George Keishingb39a6792017-11-10 22:58:52 -060092 Verify BMC RTC And UTC Time Drift
George Keishing92abc992016-10-18 13:29:25 -050093
94
George Keishingc9489162021-06-30 05:35:06 -050095BMC Redfish Reset Runtime Cycle
96 [Documentation] Reset BMC via Redfish and verify required states.
97
George Keishingfad12ad2022-03-18 16:59:52 +000098 Redfish OBMC Reboot (run)
George Keishingc9489162021-06-30 05:35:06 -050099
100 ${bmc_version}= Get BMC Version
101 Valid Value bmc_version valid_values=['${initial_bmc_version}']
102
George Keishingd5e8d862025-05-13 21:59:19 +0530103 IF '${CHECK_FOR_ERRORS}' == '${1}'
104 Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
105 END
George Keishingc9489162021-06-30 05:35:06 -0500106
107 Verify BMC RTC And UTC Time Drift
108
109
George Keishingbf1500d2017-10-30 12:47:47 -0500110BMC Reboot Cycle
111 [Documentation] Reboot BMC and wait for ready state.
George Keishing5d5b8a22019-09-11 13:48:54 -0500112
George Keishingbf1500d2017-10-30 12:47:47 -0500113 OBMC Reboot (off) stack_mode=normal
George Keishing5d5b8a22019-09-11 13:48:54 -0500114 ${bmc_version}= Get BMC Version
George Keishing9aa2f0b2019-09-18 09:49:48 -0500115 Valid Value bmc_version ["${initial_bmc_version}"]
George Keishingb39a6792017-11-10 22:58:52 -0600116 Verify BMC RTC And UTC Time Drift
George Keishingef3308b2019-09-28 10:50:33 -0500117 Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
George Keishing5d5b8a22019-09-11 13:48:54 -0500118 ${boot_side}= Get BMC Flash Chip Boot Side
119 Valid Value boot_side ['0']
George Keishingbf1500d2017-10-30 12:47:47 -0500120
121
George Keishing94659a22017-11-17 00:03:05 -0600122Test Teardown Execution
123 [Documentation] Do test case tear-down.
George Keishing92abc992016-10-18 13:29:25 -0500124 Ping Host ${OPENBMC_HOST}
Gunnar Millseac1af22016-11-14 15:30:09 -0600125 FFDC On Test Case Fail
George Keishing92abc992016-10-18 13:29:25 -0500126
127
128Validate Parameters
George Keishing94659a22017-11-17 00:03:05 -0600129 [Documentation] Validate PDU parameters.
George Keishing92abc992016-10-18 13:29:25 -0500130 Should Not Be Empty ${PDU_IP}
131 Should Not Be Empty ${PDU_TYPE}
132 Should Not Be Empty ${PDU_SLOT_NO}
133 Should Not Be Empty ${PDU_USERNAME}
134 Should Not Be Empty ${PDU_PASSWORD}
135
George Keishingc26e74d2017-11-17 00:45:20 -0600136
137Suite Setup Execution
George Keishing5d5b8a22019-09-11 13:48:54 -0500138 [Documentation] Do suite setup.
139
140 ${bmc_version}= Get BMC Version
141 Set Suite Variable ${initial_bmc_version} ${bmc_version}