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 *** |
| 18 | ${LOOP_COUNT} ${50} |
| 19 | |
George Keishing | 2c89173 | 2018-09-18 07:39:59 -0500 | [diff] [blame] | 20 | # Error strings to check from journald. |
| 21 | ${ERROR_REGEX} SEGV|core-dump |
| 22 | |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 23 | *** Test Cases *** |
| 24 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 25 | Run Multiple Power Cycle |
| 26 | [Documentation] Execute multiple power cycles. |
| 27 | [Setup] Validate Parameters |
| 28 | [Tags] Run_Multiple_Power_Cycle |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 29 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 30 | # By default run test for 50 loops, else user input iteration. |
| 31 | # Fails immediately if any of the execution rounds fail and |
| 32 | # check if BMC is still pinging and FFDC is collected. |
| 33 | Repeat Keyword ${LOOP_COUNT} times Power Cycle System Via PDU |
| 34 | |
| 35 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 36 | Run Multiple BMC Reset Via REST |
| 37 | [Documentation] Execute multiple reboots via REST. |
| 38 | [Tags] Run_Multiple_BMC_Reset_Via_REST |
| 39 | |
| 40 | # By default run test for 50 loops, else user input iteration. |
| 41 | # Fails immediately if any of the execution rounds fail and |
| 42 | # check if BMC is still pinging and FFDC is collected. |
| 43 | Repeat Keyword ${LOOP_COUNT} times BMC REST Reset Cycle |
| 44 | |
| 45 | |
| 46 | Run Multiple BMC Reset Via Reboot |
| 47 | [Documentation] Execute multiple reboots via "reboot" command. |
| 48 | [Tags] Run_Multiple_BMC_Reset_Via_Reboot |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 49 | |
| 50 | # By default run test for 50 loops, else user input iteration. |
| 51 | # Fails immediately if any of the execution rounds fail and |
| 52 | # check if BMC is still pinging and FFDC is collected. |
| 53 | Repeat Keyword ${LOOP_COUNT} times BMC Reboot Cycle |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 54 | |
| 55 | |
| 56 | *** Keywords *** |
| 57 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 58 | Power Cycle System Via PDU |
| 59 | [Documentation] Power cycle system and wait for BMC to reach Ready state. |
| 60 | Log "Doing power cycle" |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 61 | PDU Power Cycle |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 62 | Check If BMC Is Up 5 min 10 sec |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 63 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 64 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 65 | Verify BMC RTC And UTC Time Drift |
George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 66 | Field Mode Should Be Enabled |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 67 | |
| 68 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 69 | BMC REST Reset Cycle |
| 70 | [Documentation] Reset BMC via REST and wait for ready state. |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 71 | Log "Doing Reboot cycle" |
George Keishing | 137882c | 2017-10-28 09:19:05 -0500 | [diff] [blame] | 72 | ${bmc_version_before}= Get BMC Version |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 73 | Initiate BMC Reboot |
| 74 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
George Keishing | 137882c | 2017-10-28 09:19:05 -0500 | [diff] [blame] | 75 | ${bmc_version_after}= Get BMC Version |
| 76 | Should Be Equal ${bmc_version_before} ${bmc_version_after} |
George Keishing | 2c89173 | 2018-09-18 07:39:59 -0500 | [diff] [blame] | 77 | Check For Regex In Journald ${ERROR_REGEX} error_check=${0} |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 78 | Verify BMC RTC And UTC Time Drift |
George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 79 | Field Mode Should Be Enabled |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 80 | |
| 81 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 82 | BMC Reboot Cycle |
| 83 | [Documentation] Reboot BMC and wait for ready state. |
| 84 | Log "Doing Reboot cycle" |
| 85 | ${bmc_version_before}= Get BMC Version |
| 86 | OBMC Reboot (off) stack_mode=normal |
| 87 | ${bmc_version_after}= Get BMC Version |
| 88 | Should Be Equal ${bmc_version_before} ${bmc_version_after} |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 89 | Verify BMC RTC And UTC Time Drift |
George Keishing | 2c89173 | 2018-09-18 07:39:59 -0500 | [diff] [blame] | 90 | Check For Regex In Journald ${ERROR_REGEX} error_check=${0} |
George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 91 | Field Mode Should Be Enabled |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 92 | |
| 93 | |
George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 94 | Test Teardown Execution |
| 95 | [Documentation] Do test case tear-down. |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 96 | Ping Host ${OPENBMC_HOST} |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 97 | FFDC On Test Case Fail |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 98 | |
George Keishing | 9867bed | 2018-02-04 22:31:36 -0600 | [diff] [blame] | 99 | # Example of the u-boot-env o/p: |
| 100 | # root@witherspoon:~# grep fieldmode /dev/mtd/u-boot-env |
| 101 | # fieldmode=true |
| 102 | # fieldmode=true |
| 103 | ${field_mode}= |
| 104 | ... BMC Execute Command grep fieldmode /dev/mtd/u-boot-env |
| 105 | Should Contain "${field_mode[0]}" fieldmode=true |
| 106 | ... msg=u-boot-env shows "fieldmode" is not set to true. |
| 107 | |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 108 | |
| 109 | Validate Parameters |
George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 110 | [Documentation] Validate PDU parameters. |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 111 | Should Not Be Empty ${PDU_IP} |
| 112 | Should Not Be Empty ${PDU_TYPE} |
| 113 | Should Not Be Empty ${PDU_SLOT_NO} |
| 114 | Should Not Be Empty ${PDU_USERNAME} |
| 115 | Should Not Be Empty ${PDU_PASSWORD} |
| 116 | |
George Keishing | c26e74d | 2017-11-17 00:45:20 -0600 | [diff] [blame] | 117 | |
| 118 | Suite Setup Execution |
| 119 | [Documentation] Enable field mode. |
| 120 | Enable Field Mode And Verify Unmount |
| 121 | Field Mode Should Be Enabled |