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 |
| 27 | Run IPMI Standard Command sel clear |
| 28 | |
| 29 | ${resp}= Run IPMI Standard Command sel list |
| 30 | Should Contain ${resp} SEL has no entries case_insensitive=True |
| 31 | |
Tony Lee | 160aa87 | 2020-02-12 16:11:39 +0800 | [diff] [blame] | 32 | |
| 33 | Verify Add SEL Entry |
| 34 | [Documentation] Verify add SEL entry. |
| 35 | [Tags] Verify_Add_SEL_Entry |
| 36 | [Teardown] Run Keywords FFDC On Test Case Fail AND Run IPMI Standard Command sel clear |
| 37 | |
| 38 | Run IPMI Standard Command sel clear |
| 39 | Sleep 5s |
| 40 | |
| 41 | Create SEL |
| 42 | # Get last SEL entry. |
| 43 | ${resp}= Run IPMI Standard Command sel elist last 1 |
| 44 | Run Keywords Should Contain ${resp} Temperature #0x17 AND |
| 45 | ... Should Contain ${resp} Asserted |
| 46 | ... msg=Add SEL Entry failed. |
| 47 | |
| 48 | |
| 49 | Verify Reserve SEL |
| 50 | [Documentation] Verify reserve SEL. |
| 51 | [Tags] Verify_Reserve_SEL |
| 52 | |
| 53 | ${resp}= Run IPMI Standard Command |
| 54 | ... raw ${IPMI_RAW_CMD['SEL_entry']['Reserve'][0]} |
| 55 | ${reserve_id}= Split String ${resp} |
| 56 | |
| 57 | # Execute clear SEL raw command with Reservation ID. |
| 58 | # Command will not execute unless the correct Reservation ID value is provided. |
| 59 | Run IPMI Standard Command |
| 60 | ... raw 0x0a 0x47 0x${reserve_id[0]} 0x${reserve_id[1]} 0x43 0x4c 0x52 0xaa |
| 61 | |
| 62 | |
| 63 | *** Keywords *** |
| 64 | |
| 65 | Create SEL |
| 66 | [Documentation] Create a SEL. |
| 67 | |
| 68 | # Create a SEL. |
| 69 | # Example: |
| 70 | # a | 02/14/2020 | 01:16:58 | Temperature #0x17 | | Asserted |
| 71 | Run IPMI Standard Command |
| 72 | ... raw ${IPMI_RAW_CMD['SEL_entry']['Add'][0]} |