blob: caaf466518690f788e9be1c0db95b2a3eb1e911c [file] [log] [blame]
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -05001*** Settings ***
2Documentation This suite is to run some test at the end of execution.
3
George Keishing3fb91712021-07-15 10:05:51 -05004Resource ../lib/resource.robot
5Resource ../lib/bmc_redfish_resource.robot
George Keishing4d8e3092021-07-15 04:25:40 -05006Resource ../lib/openbmc_ffdc.robot
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -05007
George Keishinge25cd7b2021-08-03 06:46:28 -05008Test Teardown Test Teardown Execution
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -05009
10*** Variables ***
11
12# Error strings to check from journald.
13${ERROR_REGEX} SEGV|core-dump|FAILURE|Failed to start
14
15
16*** Test Cases ***
17
18Verify No BMC Dump And Application Failures In BMC
19 [Documentation] Verify no BMC dump and application failure exists in BMC.
20 [Tags] Verify_No_BMC_Dump_And_Application_Failures_In_BMC
21
22 # Check dump entry based on Redfish API availability.
George Keishingf84ed122021-07-15 14:44:36 -050023 Redfish.Login
George Keishing3fb91712021-07-15 10:05:51 -050024 ${resp}= Redfish.Get /redfish/v1/Managers/bmc/LogServices/Dump/Entries
25 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -050026
George Keishing3fb91712021-07-15 10:05:51 -050027 Log To Console ${resp}
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -050028
George Keishingf84ed122021-07-15 14:44:36 -050029 Run Keyword If '${resp.status}' == '${HTTP_OK}'
George Keishing3fb91712021-07-15 10:05:51 -050030 ... Should Be Equal As Strings ${resp.dict["Members@odata.count"]} 0
31 ... msg=${resp.dict["Members@odata.count"]} dumps exist.
32
George Keishingf84ed122021-07-15 14:44:36 -050033 ${rest_resp}= Run Keyword If '${resp.status}' == '${HTTP_NOT_FOUND}'
34 ... Check For REST Dumps
35
36 Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
37
38
39*** Keywords ***
40
41Check For REST Dumps
42 [Documentation] Verify no BMC dump via REST path.
43
44 ${rest_resp}= Redfish.Get /xyz/openbmc_project/dump/bmc/entry/list
George Keishing3fb91712021-07-15 10:05:51 -050045 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
46
47 Log To Console ${rest_resp}
48
49 Should Be Equal As Strings ${rest_resp.status} ${HTTP_NOT_FOUND}
50 ... msg=1 or more dumps exist.
George Keishinge25cd7b2021-08-03 06:46:28 -050051
52
53Test Teardown Execution
54 [Documentation] Do test teardown operation.
55
56 FFDC On Test Case Fail
57 # Remove rm command once the BMC dump APIs are working.
58 Run Keyword And Ignore Error BMC Execute Command rm -rf /var/lib/phosphor-debug-collector/dumps/
59 Run Keyword And Ignore Error Delete All BMC Dump
60 Run Keyword And Ignore Error Redfish Delete All BMC Dumps
61 Run Keyword And Ignore Error Redfish Delete All System Dumps