Update IPMI SEL clear test validation
This test sends an ipmitool sel clear and then verifies that there
are no SEL entries. But it does not first verify that there is at
least one entry present. It needs to do this.
Resolves openbmc/openbmc-test-automation#2156
Change-Id: If7bb279352c12056d49e004867ff1760028e14f6
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_sel.robot b/ipmi/test_ipmi_sel.robot
index 134d1cb..3eaa3de 100644
--- a/ipmi/test_ipmi_sel.robot
+++ b/ipmi/test_ipmi_sel.robot
@@ -26,9 +26,18 @@
Verify Empty SEL
- [Documentation] Verify empty SEL list.
+ [Documentation] Verify IPMI sel clear command clears the SEL entry.
[Tags] Verify_Empty_SEL
+ # Generate an error log and verify there is one atleast.
+ Create Test PEL Log
+ ${resp}= Run IPMI Standard Command sel elist last 1
+ Log To Console ${resp}
+
+ Should Contain Any ${resp} system hardware failure Asserted
+ ... msg=Add SEL Entry failed.
+
+ # Send SEL clear command and verify if it really clears up the SEL entry.
Run IPMI Standard Command sel clear
Sleep 5s