| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 1 | *** Settings *** | 
|  | 2 | Documentation   Power cycle loop. This is to test where network service | 
|  | 3 | ...             becomes unavailable during AC-Cycle stress test. | 
|  | 4 |  | 
|  | 5 | Resource        ../lib/rest_client.robot | 
|  | 6 | Resource        ../lib/pdu/pdu.robot | 
|  | 7 | Resource        ../lib/utils.robot | 
|  | 8 | Resource        ../lib/openbmc_ffdc.robot | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 9 | Resource        ../lib/state_manager.robot | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 10 | Resource        ../lib/boot_utils.robot | 
| George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 11 | Resource        ../lib/code_update_utils.robot | 
| George Keishing | 9867bed | 2018-02-04 22:31:36 -0600 | [diff] [blame] | 12 | Library         ../lib/bmc_ssh_utils.py | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 13 |  | 
| George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 14 | Test Teardown   Test Teardown Execution | 
| George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 15 | Suite Setup     Suite Setup Execution | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 16 |  | 
|  | 17 | *** Variables *** | 
| George Keishing | 397846b | 2020-04-28 03:55:53 -0500 | [diff] [blame] | 18 | ${LOOP_COUNT}          ${50} | 
|  | 19 | ${CHECK_FOR_ERRORS}    ${1} | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 20 |  | 
| George Keishing | 2c89173 | 2018-09-18 07:39:59 -0500 | [diff] [blame] | 21 | # Error strings to check from journald. | 
| Jian Zhang | c79341b | 2023-03-10 18:03:52 +0800 | [diff] [blame] | 22 | ${ERROR_REGEX}     SEGV|core-dump|FAILURE|Failed to start|Found ordering cycle | 
| George Keishing | 2c89173 | 2018-09-18 07:39:59 -0500 | [diff] [blame] | 23 |  | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 24 | *** Test Cases *** | 
|  | 25 |  | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 26 | Run Multiple Power Cycle | 
|  | 27 | [Documentation]  Execute multiple power cycles. | 
|  | 28 | [Setup]  Validate Parameters | 
|  | 29 | [Tags]  Run_Multiple_Power_Cycle | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 30 |  | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 31 | # By default run test for 50 loops, else user input iteration. | 
|  | 32 | # Fails immediately if any of the execution rounds fail and | 
|  | 33 | # check if BMC is still pinging and FFDC is collected. | 
|  | 34 | Repeat Keyword  ${LOOP_COUNT} times  Power Cycle System Via PDU | 
|  | 35 |  | 
|  | 36 |  | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 37 | Run Multiple BMC Reset Via Redfish | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 38 | [Documentation]  Execute multiple reboots via REST. | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 39 | [Tags]  Run_Multiple_BMC_Reset_Via_Redfish | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 40 |  | 
|  | 41 | # By default run test for 50 loops, else user input iteration. | 
|  | 42 | # Fails immediately if any of the execution rounds fail and | 
|  | 43 | # check if BMC is still pinging and FFDC is collected. | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 44 | Repeat Keyword  ${LOOP_COUNT} times  BMC Redfish Reset Cycle | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 45 |  | 
|  | 46 |  | 
|  | 47 | Run Multiple BMC Reset Via Reboot | 
|  | 48 | [Documentation]  Execute multiple reboots via "reboot" command. | 
|  | 49 | [Tags]  Run_Multiple_BMC_Reset_Via_Reboot | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 50 |  | 
|  | 51 | # By default run test for 50 loops, else user input iteration. | 
|  | 52 | # Fails immediately if any of the execution rounds fail and | 
|  | 53 | # check if BMC is still pinging and FFDC is collected. | 
|  | 54 | Repeat Keyword  ${LOOP_COUNT} times  BMC Reboot Cycle | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 55 |  | 
|  | 56 |  | 
| George Keishing | c948916 | 2021-06-30 05:35:06 -0500 | [diff] [blame] | 57 | Run Multiple BMC Reset When Host Is Booted Via Redfish | 
|  | 58 | [Documentation]  Execute multiple reboots via redfish. | 
|  | 59 | [Tags]  Run_Multiple_BMC_Reset_When_Host_Is_Booted_Via_Redfish | 
|  | 60 |  | 
|  | 61 | # By default run test for 50 loops, else user input iteration. | 
|  | 62 | # Fails immediately if any of the execution rounds fail and | 
|  | 63 | # check if BMC is still pinging and FFDC is collected. | 
|  | 64 | Repeat Keyword  ${LOOP_COUNT} times  BMC Redfish Reset Runtime Cycle | 
|  | 65 |  | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 66 | *** Keywords *** | 
|  | 67 |  | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 68 | Power Cycle System Via PDU | 
|  | 69 | [Documentation]  Power cycle system and wait for BMC to reach Ready state. | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 70 |  | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 71 | PDU Power Cycle | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 72 | Check If BMC Is Up  5 min  10 sec | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 73 |  | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 74 | Wait Until Keyword Succeeds  10 min  10 sec  Is BMC Ready | 
| George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 75 | Verify BMC RTC And UTC Time Drift | 
| George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 76 |  | 
|  | 77 |  | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 78 | BMC Redfish Reset Cycle | 
|  | 79 | [Documentation]  Reset BMC via Redfish and verify required states. | 
|  | 80 |  | 
|  | 81 | Redfish OBMC Reboot (off) | 
| George Keishing | 397846b | 2020-04-28 03:55:53 -0500 | [diff] [blame] | 82 |  | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 83 | ${bmc_version}=  Get BMC Version | 
| George Keishing | 397846b | 2020-04-28 03:55:53 -0500 | [diff] [blame] | 84 | Valid Value  bmc_version  valid_values=['${initial_bmc_version}'] | 
|  | 85 |  | 
| George Keishing | d5e8d86 | 2025-05-13 21:59:19 +0530 | [diff] [blame] | 86 | IF  '${CHECK_FOR_ERRORS}' == '${1}' | 
|  | 87 | Check For Regex In Journald  ${ERROR_REGEX}  error_check=${0}  boot=-b | 
|  | 88 | END | 
| George Keishing | 397846b | 2020-04-28 03:55:53 -0500 | [diff] [blame] | 89 |  | 
| George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 90 | Verify BMC RTC And UTC Time Drift | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 91 |  | 
|  | 92 |  | 
| George Keishing | c948916 | 2021-06-30 05:35:06 -0500 | [diff] [blame] | 93 | BMC Redfish Reset Runtime Cycle | 
|  | 94 | [Documentation]  Reset BMC via Redfish and verify required states. | 
|  | 95 |  | 
| George Keishing | fad12ad | 2022-03-18 16:59:52 +0000 | [diff] [blame] | 96 | Redfish OBMC Reboot (run) | 
| George Keishing | c948916 | 2021-06-30 05:35:06 -0500 | [diff] [blame] | 97 |  | 
|  | 98 | ${bmc_version}=  Get BMC Version | 
|  | 99 | Valid Value  bmc_version  valid_values=['${initial_bmc_version}'] | 
|  | 100 |  | 
| George Keishing | d5e8d86 | 2025-05-13 21:59:19 +0530 | [diff] [blame] | 101 | IF  '${CHECK_FOR_ERRORS}' == '${1}' | 
|  | 102 | Check For Regex In Journald  ${ERROR_REGEX}  error_check=${0}  boot=-b | 
|  | 103 | END | 
| George Keishing | c948916 | 2021-06-30 05:35:06 -0500 | [diff] [blame] | 104 |  | 
|  | 105 | Verify BMC RTC And UTC Time Drift | 
|  | 106 |  | 
|  | 107 |  | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 108 | BMC Reboot Cycle | 
|  | 109 | [Documentation]  Reboot BMC and wait for ready state. | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 110 |  | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 111 | OBMC Reboot (off)  stack_mode=normal | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 112 | ${bmc_version}=  Get BMC Version | 
| George Keishing | 9aa2f0b | 2019-09-18 09:49:48 -0500 | [diff] [blame] | 113 | Valid Value  bmc_version  ["${initial_bmc_version}"] | 
| George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 114 | Verify BMC RTC And UTC Time Drift | 
| George Keishing | ef3308b | 2019-09-28 10:50:33 -0500 | [diff] [blame] | 115 | Check For Regex In Journald  ${ERROR_REGEX}  error_check=${0}  boot=-b | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 116 | ${boot_side}=  Get BMC Flash Chip Boot Side | 
|  | 117 | Valid Value  boot_side  ['0'] | 
| George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 118 |  | 
|  | 119 |  | 
| George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 120 | Test Teardown Execution | 
|  | 121 | [Documentation]  Do test case tear-down. | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 122 | Ping Host  ${OPENBMC_HOST} | 
| Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 123 | FFDC On Test Case Fail | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 124 |  | 
|  | 125 |  | 
|  | 126 | Validate Parameters | 
| George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 127 | [Documentation]  Validate PDU parameters. | 
| George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 128 | Should Not Be Empty   ${PDU_IP} | 
|  | 129 | Should Not Be Empty   ${PDU_TYPE} | 
|  | 130 | Should Not Be Empty   ${PDU_SLOT_NO} | 
|  | 131 | Should Not Be Empty   ${PDU_USERNAME} | 
|  | 132 | Should Not Be Empty   ${PDU_PASSWORD} | 
|  | 133 |  | 
| George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 134 |  | 
|  | 135 | Suite Setup Execution | 
| George Keishing | 5d5b8a2 | 2019-09-11 13:48:54 -0500 | [diff] [blame] | 136 | [Documentation]  Do suite setup. | 
|  | 137 |  | 
|  | 138 | ${bmc_version}=  Get BMC Version | 
|  | 139 | Set Suite Variable  ${initial_bmc_version}  ${bmc_version} |