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 |
| 40 | [Setup] Remove Journald Logs |
| 41 | |
| 42 | Repeat Keyword ${LOOP_COUNT} times Reboot BMC And Check For Errors |
| 43 | |
| 44 | |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 45 | *** Keywords *** |
| 46 | |
George Keishing | b9f407b | 2018-02-20 00:07:46 -0600 | [diff] [blame] | 47 | Reboot BMC And Check For Errors |
| 48 | [Documentation] Boot to OS, reboot BMC and verify OCC and logs. |
| 49 | |
| 50 | OBMC Reboot (run) |
| 51 | |
| 52 | Verify OCC State ${1} |
| 53 | |
| 54 | ${journal_log}= BMC Execute Command |
| 55 | ... journalctl --no-pager | egrep 'SEGV|core-dump' ignore_err=1 |
| 56 | |
| 57 | Should Be Empty ${journal_log} |
| 58 | |
| 59 | |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 60 | Check Reset Reload Status |
Gunnar Mills | 28e403b | 2017-10-25 16:16:38 -0500 | [diff] [blame] | 61 | [Documentation] Returns reset reload status based on file presence. |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 62 | |
| 63 | ${rr_status}= Execute Command On BMC |
| 64 | ... test -e /run/openbmc/chassis@0-on && echo "Yes" || echo "No" |
| 65 | [Return] ${rr_status} |
| 66 | |
| 67 | |
| 68 | Trigger Reset Reload via BMC Reboot |
| 69 | [Documentation] Initiate Reset reload using BMC Reboot. |
| 70 | |
| 71 | Initiate BMC Reboot |
| 72 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
| 73 | |
| 74 | |
George Keishing | c6f5701 | 2017-12-18 02:32:33 -0600 | [diff] [blame] | 75 | Test Teardown Execution |
Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 76 | [Documentation] Do the post test teardown. |
| 77 | ... 1. Capture FFDC on test failure. |
| 78 | ... 2. Close all open SSH connections. |
| 79 | |
| 80 | FFDC On Test Case Fail |
| 81 | Close All Connections |