Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test reset reload functionality of BMC. |
| 4 | |
| 5 | Resource ../lib/rest_client.robot |
| 6 | Resource ../lib/state_manager.robot |
| 7 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 8 | Resource ../lib/utils.robot |
| 9 | Resource ../lib/boot_utils.robot |
| 10 | Resource ../lib/open_power_utils.robot |
| 11 | Library ../lib/bmc_ssh_utils.py |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 12 | |
| 13 | Test Setup Open Connection And Log In |
George Keishing | c6f5701 | 2017-12-18 02:32:33 -0600 | [diff] [blame] | 14 | Test Teardown Test Teardown Execution |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 15 | |
| 16 | *** Variables *** |
| 17 | |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 18 | ${LOOP_COUNT} ${1} |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 19 | |
| 20 | *** Test Cases *** |
| 21 | |
Rahul Maheshwari | b70a316 | 2017-05-17 04:41:10 -0500 | [diff] [blame] | 22 | Verify BMC Reset Reload With System On |
| 23 | [Documentation] Validate chassis "ON" and host "Running" state is |
| 24 | ... unchanged after BMC reset reload. |
| 25 | [Tags] Verify_BMC_Reset_Reload_With_System_On |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 26 | |
| 27 | Initiate Host Boot |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 28 | |
| 29 | Trigger Reset Reload via BMC Reboot |
| 30 | |
George Keishing | c6f5701 | 2017-12-18 02:32:33 -0600 | [diff] [blame] | 31 | ${rr_status}= Check Reset Reload Status |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 32 | Should Be Equal ${rr_status} Yes |
| 33 | |
George Keishing | c6f5701 | 2017-12-18 02:32:33 -0600 | [diff] [blame] | 34 | Wait Until Keyword Succeeds 5 min 10 sec Is OS Booted |
Rahul Maheshwari | b70a316 | 2017-05-17 04:41:10 -0500 | [diff] [blame] | 35 | |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 36 | |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 37 | Test Reset Reload When Host Booted |
| 38 | [Documentation] Reset reload when host is booted. |
| 39 | [Tags] Test_Reset_Reload_When_Host_Booted |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 40 | |
| 41 | Repeat Keyword ${LOOP_COUNT} times Reboot BMC And Check For Errors |
| 42 | |
| 43 | |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 44 | *** Keywords *** |
| 45 | |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 46 | Reboot BMC And Check For Errors |
| 47 | [Documentation] Boot to OS, reboot BMC and verify OCC and logs. |
| 48 | |
| 49 | OBMC Reboot (run) |
| 50 | |
| 51 | Verify OCC State ${1} |
| 52 | |
| 53 | ${journal_log}= BMC Execute Command |
George Keishing | 60f9ef5 | 2018-09-11 11:16:54 -0500 | [diff] [blame] | 54 | ... journalctl -b --no-pager | egrep 'SEGV|core-dump' ignore_err=1 |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 55 | |
George Keishing | 7f23439 | 2018-02-22 01:31:39 -0600 | [diff] [blame] | 56 | Should Be Empty ${journal_log[0]} |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 57 | |
| 58 | |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 59 | Check Reset Reload Status |
Gunnar Mills | 28e403b | 2017-10-25 16:16:38 -0500 | [diff] [blame] | 60 | [Documentation] Returns reset reload status based on file presence. |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 61 | |
Joy Onyerikwu | b992261 | 2018-05-14 12:36:57 -0500 | [diff] [blame] | 62 | ${rr_status} ${stderr} ${rc}= BMC Execute Command |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 63 | ... test -e /run/openbmc/chassis@0-on && echo "Yes" || echo "No" |
| 64 | [Return] ${rr_status} |
| 65 | |
| 66 | |
| 67 | Trigger Reset Reload via BMC Reboot |
| 68 | [Documentation] Initiate Reset reload using BMC Reboot. |
| 69 | |
| 70 | Initiate BMC Reboot |
| 71 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
| 72 | |
| 73 | |
George Keishing | c6f5701 | 2017-12-18 02:32:33 -0600 | [diff] [blame] | 74 | Test Teardown Execution |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 75 | [Documentation] Do the post test teardown. |
| 76 | ... 1. Capture FFDC on test failure. |
| 77 | ... 2. Close all open SSH connections. |
| 78 | |
| 79 | FFDC On Test Case Fail |
| 80 | Close All Connections |