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