Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite is to run some test at the end of execution. |
| 3 | |
George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 4 | Resource ../lib/resource.robot |
| 5 | Resource ../lib/bmc_redfish_resource.robot |
George Keishing | 4d8e309 | 2021-07-15 04:25:40 -0500 | [diff] [blame] | 6 | Resource ../lib/openbmc_ffdc.robot |
Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 7 | |
| 8 | Test Teardown FFDC On Test Case Fail |
| 9 | |
| 10 | |
| 11 | *** Variables *** |
| 12 | |
| 13 | # Error strings to check from journald. |
| 14 | ${ERROR_REGEX} SEGV|core-dump|FAILURE|Failed to start |
| 15 | |
| 16 | |
| 17 | *** Test Cases *** |
| 18 | |
| 19 | Verify No BMC Dump And Application Failures In BMC |
| 20 | [Documentation] Verify no BMC dump and application failure exists in BMC. |
| 21 | [Tags] Verify_No_BMC_Dump_And_Application_Failures_In_BMC |
| 22 | |
| 23 | # Check dump entry based on Redfish API availability. |
George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 24 | ${resp}= Redfish.Get /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 25 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] |
Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 26 | |
George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 27 | Log To Console ${resp} |
Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 28 | |
George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 29 | ${status}= Run Keyword If '${resp.status}' == '${HTTP_OK}' |
| 30 | ... Should Be Equal As Strings ${resp.dict["Members@odata.count"]} 0 |
| 31 | ... msg=${resp.dict["Members@odata.count"]} dumps exist. |
| 32 | |
| 33 | ${rest_resp}= Run Keyword If '${status}' == 'None' |
| 34 | ... Redfish.Get /xyz/openbmc_project/dump/bmc/entry/list |
| 35 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] |
| 36 | |
| 37 | Log To Console ${rest_resp} |
| 38 | |
| 39 | Should Be Equal As Strings ${rest_resp.status} ${HTTP_NOT_FOUND} |
| 40 | ... msg=1 or more dumps exist. |
Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 41 | |
| 42 | Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b |
George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 43 | |