Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite tests Platform Event Log (PEL) functionality of OpenBMC. |
| 3 | |
| 4 | Library ../../lib/pel_utils.py |
| 5 | Resource ../../lib/openbmc_ffdc.robot |
| 6 | |
Rahul Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 7 | Test Setup Redfish.Login |
| 8 | Test Teardown Run Keywords Redfish.Logout AND FFDC On Test Case Fail |
Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 9 | |
| 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 | |
| 20 | Create 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 Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 24 | Redfish Purge Event Log |
Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 25 | Create Test PEL Log |
Rahul Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 26 | ${pel_id}= Get PEL Log Via BMC CLI |
| 27 | Should Not Be Empty ${pel_id} msg=System PEL log entry is empty. |
| 28 | |
| 29 | |
| 30 | Verify 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 Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 41 | |
| 42 | |
Rahul Maheshwari | 58b99fc | 2020-03-03 00:05:55 -0600 | [diff] [blame] | 43 | Verify PEL ID Numbering |
| 44 | [Documentation] Verify PEL ID numbering. |
| 45 | [Tags] Verify_PEL_ID_Numbering |
| 46 | |
| 47 | Redfish Purge Event Log |
| 48 | Create Test PEL Log |
| 49 | Create Test PEL Log |
| 50 | |
| 51 | ${pel_ids}= Get PEL Log Via BMC CLI |
| 52 | |
| 53 | # Example of PEL IDs from PEL logs. |
| 54 | # [0x50000012]: <--- First PEL ID |
| 55 | # [CreatorID]: BMC |
| 56 | # [CompID]: 0x1000 |
| 57 | # [PLID]: 0x50000012 |
| 58 | # [Subsystem]: BMC Firmware |
| 59 | # [Message]: An application had an internal failure |
| 60 | # [SRC]: BD8D1002 |
| 61 | # [Commit Time]: 03/02/2020 09:35:15 |
| 62 | # [Sev]: Unrecoverable Error |
| 63 | # |
| 64 | # [0x50000013]: <--- Second PEL ID |
| 65 | # [CreatorID]: BMC |
| 66 | # [CompID]: 0x1000 |
| 67 | # [PLID]: 0x50000013 |
| 68 | # [Subsystem]: BMC Firmware |
| 69 | # [Message]: An application had an internal failure |
| 70 | # [SRC]: BD8D1002 |
| 71 | # [Commit Time]: 03/02/2020 09:35:15 |
| 72 | # [Sev]: Unrecoverable Error |
| 73 | |
| 74 | Should Be True ${pel_ids[1]} == ${pel_ids[0]}+1 |
| 75 | |
| 76 | |
Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 77 | *** Keywords *** |
| 78 | |
| 79 | Create Test PEL Log |
| 80 | [Documentation] Generate test PEL log. |
| 81 | |
| 82 | # Test PEL log entry example: |
| 83 | # { |
| 84 | # "0x5000002D": { |
| 85 | # "SRC": "BD8D1002", |
| 86 | # "Message": "An application had an internal failure", |
| 87 | # "PLID": "0x5000002D", |
| 88 | # "CreatorID": "BMC", |
| 89 | # "Subsystem": "BMC Firmware", |
| 90 | # "Commit Time": "02/25/2020 04:47:09", |
| 91 | # "Sev": "Unrecoverable Error", |
| 92 | # "CompID": "0x1000" |
| 93 | # } |
| 94 | # } |
| 95 | |
| 96 | BMC Execute Command ${CMD_INTERNAL_FAILURE} |
| 97 | |
| 98 | |
Rahul Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 99 | Get PEL Log Via BMC CLI |
| 100 | [Documentation] Returns the list of PEL IDs using BMC CLI. |
Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 101 | |
| 102 | ${pel_records}= Peltool -l |
Rahul Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 103 | ${ids}= Get Dictionary Keys ${pel_records} |
Rahul Maheshwari | faa5d20 | 2020-02-24 23:32:57 -0600 | [diff] [blame] | 104 | |
Rahul Maheshwari | f575c90 | 2020-02-26 04:38:40 -0600 | [diff] [blame] | 105 | [Return] ${ids} |