blob: 5fa8e72e1d5d52a8eadb5a6732c1612ab9f38bb4 [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
40 [Setup] Remove Journald Logs
41
42 Repeat Keyword ${LOOP_COUNT} times Reboot BMC And Check For Errors
43
44
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050045*** Keywords ***
46
George Keishingb9f407b2018-02-20 00:07:46 -060047Reboot 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
George Keishing7f234392018-02-22 01:31:39 -060057 Should Be Empty ${journal_log[0]}
George Keishingb9f407b2018-02-20 00:07:46 -060058
59
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050060Check Reset Reload Status
Gunnar Mills28e403b2017-10-25 16:16:38 -050061 [Documentation] Returns reset reload status based on file presence.
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050062
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
68Trigger 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 Keishingc6f57012017-12-18 02:32:33 -060075Test Teardown Execution
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050076 [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