xref: /openbmc/openbmc-test-automation/systest/test_bmc_poll_errors.robot (revision 62b0c90e54c41276e2d41aff217f93c91d9df4a7)
1*** Settings ***
2Documentation     BMC error polling test to check errors every 10 seconds.
3
4Resource          ../lib/rest_client.robot
5Resource          ../lib/openbmc_ffdc.robot
6Resource          ../lib/resource.robot
7Resource          ../lib/boot_utils.robot
8Resource          ../lib/bmc_redfish_resource.robot
9Resource          ../lib/esel_utils.robot
10
11Suite Setup       Suite Setup Execution
12Test Teardown     Post Test Case Execution
13
14Test Tags        BMC_Poll_Errors
15
16*** Variables ***
17
18# Default duration and interval of test to run.
19${POLL_DURATION}  48 hours
20${POLL_INTERVAL}  10 second
21
22# Error log Severities to ignore when checking Error Logs.
23@{ESEL_IGNORE_LIST}
24...  xyz.openbmc_project.Logging.Entry.Level.Informational
25
26
27*** Test Cases ***
28
29Poll BMC For Errors
30    [Documentation]  Poll BMC for errors.
31    ...  exist.
32    [Tags]  Poll_BMC_For_Errors
33
34    Redfish.Login
35    Repeat Keyword  ${POLL_DURATION}  Perform GET Request And Check For Errors
36
37
38*** Keywords ***
39
40Perform GET Request And Check For Errors
41    [Documentation]  Check if there is any error reported.
42
43    Redfish.Get  /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
44
45    Event Log Should Not Exist
46    Sleep  ${POLL_INTERVAL}
47
48
49Suite Setup Execution
50    [Documentation]  Do test setup initialization.
51
52    Should Not Be Empty
53    ...  ${OS_HOST}  msg=You must provide hostname or IP of the OS host.
54    Should Not Be Empty
55    ...  ${OS_USERNAME}  msg=You must provide OS host user name.
56    Should Not Be Empty
57    ...  ${OS_PASSWORD}  msg=You must provide OS host user password.
58
59    Redfish Power On  stack_mode=skip
60
61    Run Keyword And Ignore Error  Redfish Purge Event Log
62    Run Keyword And Ignore Error  Redfish Delete All BMC Dumps
63
64
65Post Test Case Execution
66    [Documentation]  Do the post test teardown.
67    ...  1. Capture FFDC on test failure.
68
69    FFDC On Test Case Fail
70    Redfish.Logout
71