Added testcases to check disk usage when error logs exceed max limit
Testcases are added for following types of error logs:
- Informational error log
- Predictive error log
- Unrecoverable error log
- Informational and Predictive error log
- Informational and Unrecoverable error log
- Unrecoverable and Predictive error log
- Informational, Unrecoverable and Predictive error log
Change-Id: Ia35c0d3270745dc415df45fcf4e47f649687e586
Signed-off-by: manashsarma <manashsarma@in.ibm.com>
diff --git a/openpower/pel/test_bmc_pel.robot b/openpower/pel/test_bmc_pel.robot
index d691de1..2d2b343 100644
--- a/openpower/pel/test_bmc_pel.robot
+++ b/openpower/pel/test_bmc_pel.robot
@@ -522,11 +522,15 @@
[Tags] Verify_Error_Logging_Rotation_Policy
[Template] Error Logging Rotation Policy
- # Error log type Max allocated space % of total logging space
- Informational 15
- Unrecoverable 30
- Predictive 30
-
+ # Error logs to be created % of total logging space when error
+ # log exceeds max limit.
+ Informational BMC 3000 15
+ Predictive BMC 3000 30
+ Unrecoverable BMC 3000 30
+ Informational BMC 1500, Predictive BMC 1500 45
+ Informational BMC 1500, Unrecoverable BMC 1500 45
+ Unrecoverable BMC 1500, Predictive BMC 1500 30
+ Unrecoverable BMC 1000, Informational BMC 1000, Predictive BMC 1000 45
Verify Reverse Order Of PEL Logs
[Documentation] Verify PEL command to output PEL logs in reverse order.
@@ -619,7 +623,8 @@
[Arguments] ${error_log_type} ${max_allocated_space_percentage}
# Description of argument(s):
- # error_log_type Error log type.
+ # error_log Error logs to be created (E.g. Informational BMC 3000
+ # stands for BMC created 3000 informational error logs).
# max_allocated_space_percentage The maximum percentage of disk usage for given error
# log type when maximum count/log size is reached.
# The maximum error log count is 3000.
@@ -628,20 +633,18 @@
# in BMC during the test.
Redfish Purge Event Log
- # Determine the log generating command as per type of error.
- ${cmd}= Set Variable If
- ... '${error_log_type}' == 'Informational' ${CMD_INFORMATIONAL_ERROR}
- ... '${error_log_type}' == 'Unrecoverable' ${CMD_UNRECOVERABLE_ERROR}
- ... '${error_log_type}' == 'Predictive' ${CMD_PREDICTIVE_ERROR}
+ @{lists}= Split String ${error_log_type} ,${SPACE}
- # Create 3001 information logs. The logging disk capacity limit is set to 20MB and the max log
- # count limit is 3000. Once log count crosses the limit, both BMC and non BMC created information,
- # non-informational logs are reduced to 15% and 30% respectively(i.e. 3 MB, 6 MB).
+ ${length}= Get Length ${lists}
- FOR ${count} IN RANGE 0 3001
- BMC Execute Command ${cmd}
+ FOR ${list} IN RANGE ${length}
+ @{words}= Split String ${lists}[${list}] ${SPACE}
+ Create Error Log ${words}[0] ${words}[1] ${words}[2]
END
+ # Create an additional error log to exceed max error logs limit.
+ BMC Execute Command ${CMD_UNRECOVERABLE_ERROR}
+
# Delay for BMC to perform delete older error logs when log limit exceeds.
Sleep 10s
@@ -655,6 +658,23 @@
Should Be True ${percent_diff} <= 0.5
+Create Error Log
+ [Arguments] ${error_severity} ${error_creator} ${count}
+
+ # Description of argument(s):
+ # error_severity Severity of the error (E.g. Informational, Unrecoberable or Predictive)
+ # error_creator Name of error log's creator(E.g BMC, Host Boot)
+ # count Number of error logs to be generated.
+
+ FOR ${i} IN RANGE 0 ${count}
+ ${cmd}= Set Variable If
+ ... '${error_severity}' == 'Informational' ${CMD_INFORMATIONAL_ERROR}
+ ... '${error_severity}' == 'Predictive' ${CMD_PREDICTIVE_ERROR}
+ ... '${error_severity}' == 'Unrecoverable' ${CMD_UNRECOVERABLE_ERROR}
+ BMC Execute Command ${cmd}
+ END
+
+
Get Disk Usage For Error Logs
[Documentation] Get disk usage percentage for error logs.