blob: 05e91e7d526247edb6bee994f994045119d9844b [file] [log] [blame]
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -06001*** Settings ***
2Documentation This suite tests Platform Event Log (PEL) functionality of OpenBMC.
3
4Library ../../lib/pel_utils.py
5Resource ../../lib/openbmc_ffdc.robot
6
Rahul Maheshwarif575c902020-02-26 04:38:40 -06007Test Setup Redfish.Login
8Test Teardown Run Keywords Redfish.Logout AND FFDC On Test Case Fail
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -06009
10
11*** Variables ***
12
13${CMD_INTERNAL_FAILURE} busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging
14... xyz.openbmc_project.Logging.Create Create ssa{ss} xyz.openbmc_project.Common.Error.InternalFailure
15... xyz.openbmc_project.Logging.Entry.Level.Error 0
16
17
18*** Test Cases ***
19
20Create Test PEL Log And Verify
21 [Documentation] Create PEL log using busctl command and verify via peltool.
22 [Tags] Create_Test_PEL_Log_And_Verify
23
Rahul Maheshwarif575c902020-02-26 04:38:40 -060024 Redfish Purge Event Log
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -060025 Create Test PEL Log
Rahul Maheshwarif575c902020-02-26 04:38:40 -060026 ${pel_id}= Get PEL Log Via BMC CLI
27 Should Not Be Empty ${pel_id} msg=System PEL log entry is empty.
28
29
30Verify PEL Log Persistence After BMC Reboot
31 [Documentation] Verify PEL log persistence after BMC reboot.
32 [Tags] Verify_PEL_Log_Persistence_After_BMC_Reboot
33
34 Create Test PEL Log
35 ${pel_before_reboot}= Get PEL Log Via BMC CLI
36
37 Redfish OBMC Reboot (off)
38 ${pel_after_reboot}= Get PEL Log Via BMC CLI
39
40 List Should Contain Sub List ${pel_after_reboot} ${pel_before_reboot}
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -060041
42
43*** Keywords ***
44
45Create Test PEL Log
46 [Documentation] Generate test PEL log.
47
48 # Test PEL log entry example:
49 # {
50 # "0x5000002D": {
51 # "SRC": "BD8D1002",
52 # "Message": "An application had an internal failure",
53 # "PLID": "0x5000002D",
54 # "CreatorID": "BMC",
55 # "Subsystem": "BMC Firmware",
56 # "Commit Time": "02/25/2020 04:47:09",
57 # "Sev": "Unrecoverable Error",
58 # "CompID": "0x1000"
59 # }
60 # }
61
62 BMC Execute Command ${CMD_INTERNAL_FAILURE}
63
64
Rahul Maheshwarif575c902020-02-26 04:38:40 -060065Get PEL Log Via BMC CLI
66 [Documentation] Returns the list of PEL IDs using BMC CLI.
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -060067
68 ${pel_records}= Peltool -l
Rahul Maheshwarif575c902020-02-26 04:38:40 -060069 ${ids}= Get Dictionary Keys ${pel_records}
Rahul Maheshwarifaa5d202020-02-24 23:32:57 -060070
Rahul Maheshwarif575c902020-02-26 04:38:40 -060071 [Return] ${ids}