blob: ccc1f92dfd7c976979f723d8f9e19527874f1efb [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
8Test 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
19Verify 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 Keishingf84ed122021-07-15 14:44:36 -050024 Redfish.Login
George Keishing3fb91712021-07-15 10:05:51 -050025 ${resp}= Redfish.Get /redfish/v1/Managers/bmc/LogServices/Dump/Entries
26 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -050027
George Keishing3fb91712021-07-15 10:05:51 -050028 Log To Console ${resp}
Rahul Maheshwaricf0861f2021-07-15 03:23:55 -050029
George Keishingf84ed122021-07-15 14:44:36 -050030 Run Keyword If '${resp.status}' == '${HTTP_OK}'
George Keishing3fb91712021-07-15 10:05:51 -050031 ... Should Be Equal As Strings ${resp.dict["Members@odata.count"]} 0
32 ... msg=${resp.dict["Members@odata.count"]} dumps exist.
33
George Keishingf84ed122021-07-15 14:44:36 -050034 ${rest_resp}= Run Keyword If '${resp.status}' == '${HTTP_NOT_FOUND}'
35 ... Check For REST Dumps
36
37 Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
38
39
40*** Keywords ***
41
42Check For REST Dumps
43 [Documentation] Verify no BMC dump via REST path.
44
45 ${rest_resp}= Redfish.Get /xyz/openbmc_project/dump/bmc/entry/list
George Keishing3fb91712021-07-15 10:05:51 -050046 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
47
48 Log To Console ${rest_resp}
49
50 Should Be Equal As Strings ${rest_resp.status} ${HTTP_NOT_FOUND}
51 ... msg=1 or more dumps exist.