blob: 4f9eb8d3ac71fd616dd80e15f6725b55d007e696 [file] [log] [blame]
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -05001*** Settings ***
2
3Documentation Test reset reload functionality of BMC.
4
5Resource ../lib/rest_client.robot
6Resource ../lib/state_manager.robot
7Resource ../lib/openbmc_ffdc.robot
George Keishingb9f407b2018-02-20 00:07:46 -06008Resource ../lib/utils.robot
9Resource ../lib/boot_utils.robot
10Resource ../lib/open_power_utils.robot
11Library ../lib/bmc_ssh_utils.py
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050012
13Test Setup Open Connection And Log In
George Keishingc6f57012017-12-18 02:32:33 -060014Test Teardown Test Teardown Execution
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050015
16*** Variables ***
17
George Keishingb9f407b2018-02-20 00:07:46 -060018${LOOP_COUNT} ${1}
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050019
20*** Test Cases ***
21
Rahul Maheshwarib70a3162017-05-17 04:41:10 -050022Verify 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 Maheshwari8dd7ed82017-03-22 17:11:41 -050026
27 Initiate Host Boot
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050028
29 Trigger Reset Reload via BMC Reboot
30
George Keishingc6f57012017-12-18 02:32:33 -060031 ${rr_status}= Check Reset Reload Status
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050032 Should Be Equal ${rr_status} Yes
33
George Keishingc6f57012017-12-18 02:32:33 -060034 Wait Until Keyword Succeeds 5 min 10 sec Is OS Booted
Rahul Maheshwarib70a3162017-05-17 04:41:10 -050035
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050036
George Keishingb9f407b2018-02-20 00:07:46 -060037Test Reset Reload When Host Booted
38 [Documentation] Reset reload when host is booted.
39 [Tags] Test_Reset_Reload_When_Host_Booted
George Keishingb9f407b2018-02-20 00:07:46 -060040
41 Repeat Keyword ${LOOP_COUNT} times Reboot BMC And Check For Errors
42
43
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050044*** Keywords ***
45
George Keishingb9f407b2018-02-20 00:07:46 -060046Reboot 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 Keishing60f9ef52018-09-11 11:16:54 -050054 ... journalctl -b --no-pager | egrep 'SEGV|core-dump' ignore_err=1
George Keishingb9f407b2018-02-20 00:07:46 -060055
George Keishing7f234392018-02-22 01:31:39 -060056 Should Be Empty ${journal_log[0]}
George Keishingb9f407b2018-02-20 00:07:46 -060057
58
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050059Check Reset Reload Status
Gunnar Mills28e403b2017-10-25 16:16:38 -050060 [Documentation] Returns reset reload status based on file presence.
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050061
Joy Onyerikwub9922612018-05-14 12:36:57 -050062 ${rr_status} ${stderr} ${rc}= BMC Execute Command
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050063 ... test -e /run/openbmc/chassis@0-on && echo "Yes" || echo "No"
64 [Return] ${rr_status}
65
66
67Trigger 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 Keishingc6f57012017-12-18 02:32:33 -060074Test Teardown Execution
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050075 [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