| 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 |  | 
| George Keishing | e25cd7b | 2021-08-03 06:46:28 -0500 | [diff] [blame] | 8 | Test Teardown   Test Teardown Execution | 
| Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 9 |  | 
 | 10 | *** Variables *** | 
 | 11 |  | 
 | 12 | # Error strings to check from journald. | 
| Jian Zhang | c79341b | 2023-03-10 18:03:52 +0800 | [diff] [blame] | 13 | ${ERROR_REGEX}     SEGV|core-dump|FAILURE|Failed to start|Found ordering cycle | 
| George Keishing | 140351f | 2022-03-10 08:10:01 -0600 | [diff] [blame] | 14 | ${SKIP_ERROR}      ${EMPTY} | 
| Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 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 | f84ed12 | 2021-07-15 14:44:36 -0500 | [diff] [blame] | 24 |     Redfish.Login | 
| ganesanb | 4d43028 | 2023-04-27 14:33:23 +0000 | [diff] [blame] | 25 |     ${resp}=  Redfish.Get  /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries | 
| George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 26 |     ...  valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] | 
| Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 27 |  | 
| George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 28 |     Log To Console  ${resp} | 
| Rahul Maheshwari | cf0861f | 2021-07-15 03:23:55 -0500 | [diff] [blame] | 29 |  | 
| George Keishing | 79fc7f0 | 2025-05-02 00:37:49 +0530 | [diff] [blame] | 30 |     IF  '${resp.status}' == '${HTTP_OK}' | 
 | 31 |         Should Be Equal As Strings  ${resp.dict["Members@odata.count"]}  0 | 
 | 32 |         ...  msg=${resp.dict["Members@odata.count"]} dumps exist. | 
 | 33 |     END | 
| George Keishing | 3fb9171 | 2021-07-15 10:05:51 -0500 | [diff] [blame] | 34 |  | 
| George Keishing | 140351f | 2022-03-10 08:10:01 -0600 | [diff] [blame] | 35 |     Check For Regex In Journald  ${ERROR_REGEX}  error_check=${0}  boot=-b  filter_string=${SKIP_ERROR} | 
| George Keishing | f84ed12 | 2021-07-15 14:44:36 -0500 | [diff] [blame] | 36 |  | 
 | 37 |  | 
 | 38 | *** Keywords *** | 
 | 39 |  | 
| George Keishing | e25cd7b | 2021-08-03 06:46:28 -0500 | [diff] [blame] | 40 | Test Teardown Execution | 
 | 41 |     [Documentation]  Do test teardown operation. | 
 | 42 |  | 
 | 43 |     FFDC On Test Case Fail | 
 | 44 |     # Remove rm command  once the BMC dump APIs are working. | 
 | 45 |     Run Keyword And Ignore Error  BMC Execute Command  rm -rf /var/lib/phosphor-debug-collector/dumps/ | 
| George Keishing | e25cd7b | 2021-08-03 06:46:28 -0500 | [diff] [blame] | 46 |     Run Keyword And Ignore Error  Redfish Delete All BMC Dumps | 
 | 47 |     Run Keyword And Ignore Error  Redfish Delete All System Dumps |