blob: b8f4a9e5252883a35080d5199a734bac4d9374dd [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
George Keishingdc656672020-02-25 07:45:16 -060027
Rahul Maheshwari712baaf2019-07-29 23:52:36 -050028 Run IPMI Standard Command sel clear
George Keishingdc656672020-02-25 07:45:16 -060029 Sleep 5s
Rahul Maheshwari712baaf2019-07-29 23:52:36 -050030
31 ${resp}= Run IPMI Standard Command sel list
32 Should Contain ${resp} SEL has no entries case_insensitive=True
33
Tony Lee160aa872020-02-12 16:11:39 +080034
35Verify 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
51Verify 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
67Create 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]}