Rahul Maheshwari | 712baaf | 2019-07-29 23:52:36 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test IPMI SEL functionality. |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
Tony Lee | 160aa87 | 2020-02-12 16:11:39 +0800 | [diff] [blame] | 6 | Variables ../data/ipmi_raw_cmd_table.py |
Rahul Maheshwari | 712baaf | 2019-07-29 23:52:36 -0500 | [diff] [blame] | 7 | |
| 8 | Test Teardown FFDC On Test Case Fail |
| 9 | |
Tony Lee | 160aa87 | 2020-02-12 16:11:39 +0800 | [diff] [blame] | 10 | |
Rahul Maheshwari | 712baaf | 2019-07-29 23:52:36 -0500 | [diff] [blame] | 11 | *** Test Cases *** |
| 12 | |
| 13 | Verify IPMI SEL Version |
| 14 | [Documentation] Verify IPMI SEL's version info. |
| 15 | [Tags] Verify_IPMI_SEL_Version |
| 16 | ${version_info}= Get IPMI SEL Setting Version |
| 17 | ${setting_status}= Fetch From Left ${version_info} ( |
| 18 | ${setting_status}= Evaluate $setting_status.replace(' ','') |
| 19 | |
| 20 | Should Be True ${setting_status} >= 1.5 |
| 21 | Should Contain ${version_info} v2 compliant case_insensitive=True |
| 22 | |
| 23 | |
| 24 | Verify Empty SEL |
| 25 | [Documentation] Verify empty SEL list. |
| 26 | [Tags] Verify_Empty_SEL |
George Keishing | dc65667 | 2020-02-25 07:45:16 -0600 | [diff] [blame] | 27 | |
Rahul Maheshwari | 712baaf | 2019-07-29 23:52:36 -0500 | [diff] [blame] | 28 | Run IPMI Standard Command sel clear |
George Keishing | dc65667 | 2020-02-25 07:45:16 -0600 | [diff] [blame] | 29 | Sleep 5s |
Rahul Maheshwari | 712baaf | 2019-07-29 23:52:36 -0500 | [diff] [blame] | 30 | |
| 31 | ${resp}= Run IPMI Standard Command sel list |
| 32 | Should Contain ${resp} SEL has no entries case_insensitive=True |
| 33 | |
Tony Lee | 160aa87 | 2020-02-12 16:11:39 +0800 | [diff] [blame] | 34 | |
| 35 | Verify Add SEL Entry |
| 36 | [Documentation] Verify add SEL entry. |
| 37 | [Tags] Verify_Add_SEL_Entry |
| 38 | [Teardown] Run Keywords FFDC On Test Case Fail AND Run IPMI Standard Command sel clear |
| 39 | |
| 40 | Run IPMI Standard Command sel clear |
| 41 | Sleep 5s |
| 42 | |
| 43 | Create SEL |
| 44 | # Get last SEL entry. |
| 45 | ${resp}= Run IPMI Standard Command sel elist last 1 |
| 46 | Run Keywords Should Contain ${resp} Temperature #0x17 AND |
| 47 | ... Should Contain ${resp} Asserted |
| 48 | ... msg=Add SEL Entry failed. |
| 49 | |
| 50 | |
| 51 | Verify Reserve SEL |
| 52 | [Documentation] Verify reserve SEL. |
| 53 | [Tags] Verify_Reserve_SEL |
| 54 | |
| 55 | ${resp}= Run IPMI Standard Command |
| 56 | ... raw ${IPMI_RAW_CMD['SEL_entry']['Reserve'][0]} |
| 57 | ${reserve_id}= Split String ${resp} |
| 58 | |
| 59 | # Execute clear SEL raw command with Reservation ID. |
| 60 | # Command will not execute unless the correct Reservation ID value is provided. |
| 61 | Run IPMI Standard Command |
| 62 | ... raw 0x0a 0x47 0x${reserve_id[0]} 0x${reserve_id[1]} 0x43 0x4c 0x52 0xaa |
| 63 | |
| 64 | |
| 65 | *** Keywords *** |
| 66 | |
| 67 | Create SEL |
| 68 | [Documentation] Create a SEL. |
| 69 | |
| 70 | # Create a SEL. |
| 71 | # Example: |
| 72 | # a | 02/14/2020 | 01:16:58 | Temperature #0x17 | | Asserted |
| 73 | Run IPMI Standard Command |
| 74 | ... raw ${IPMI_RAW_CMD['SEL_entry']['Add'][0]} |