blob: aefe21b0abbc8b13d7a30c12e7febbe1787252dc [file] [log] [blame]
Rahul Maheshwari712baaf2019-07-29 23:52:36 -05001*** Settings ***
2
3Documentation Module to test IPMI SEL functionality.
4Resource ../lib/ipmi_client.robot
5Resource ../lib/openbmc_ffdc.robot
Tony Lee160aa872020-02-12 16:11:39 +08006Variables ../data/ipmi_raw_cmd_table.py
Rahul Maheshwari712baaf2019-07-29 23:52:36 -05007
8Test Teardown FFDC On Test Case Fail
9
Tony Lee160aa872020-02-12 16:11:39 +080010
Rahul Maheshwari712baaf2019-07-29 23:52:36 -050011*** Test Cases ***
12
13Verify 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
24Verify 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 Lee160aa872020-02-12 16:11:39 +080032
33Verify 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
49Verify 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
65Create 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]}