Create new script for IPMI System Info Parameters 0 to 5
Following parameters are verfied in the script,
1. Set In Progress - param 0
2. System Firmware Version - param 1
3. System Name - param 2
4. Primary Operating System Name - param 3
5. Operating System Name - param 4
6. Present OS Version Number - param 5
Testcases Created:
- Verify System Info Set In Progress
- Verify System Info Set In Progress After BMC Reboot
- Verify Get System Info Set In Progress With Invalid Data Length
- Verify Set System Info Set In Progress With Invalid Data Length
- Verify Set System Info Set In Progress With Invalid State
- Verify System Info System Firmware Version
- Verify Get System Info System Firmware Version With Invalid Data Length
- Verify Set System Info System Firmware Version With Invalid Data Length
- Verify System Info System Name
- Verify Get System Info System Name With Invalid Data Length
- Verify Set System Info System Name With Invalid Data Length
- Verify System Info Primary Operating System Name
- Verify System Info Primary Operating System Name After BMC Reboot
- Verify Get System Info Primary Operating System Name With Invalid Data Length
- Verify Set System Info Primary Operating System Name With Invalid Data Length
- Verify System Info Operating System Name
- Verify System Info Operating System Name After BMC Reboot
- Verify Get System Info Operating System Name With Invalid Data Length
- Verify Set System Info Operating System Name With Invalid Data Length
- Verify System Info Present OS Version Number
- Verify Get System Info Present OS Version Number With Invalid Data Request
- Verify Set System Info Present OS Version Number With Invalid Data Request
For Param 0 - Set In Progress, validation for change in set-in-progress/ set-complete are verified with valid request data bytes and invalid request data bytes. Since it is volatile, the response bytes are verified after cold reset.
For param 1 - System Firmware Version, the request data bytes are generated randomly and verified with response data byte, and verified invalid request data byte.
For param 3 - System Name, the request data bytes are generated randomly and verified with response data byte, and verified invalid request data byte.
For param 3 - Primary Operating System Name, the request data bytes are identified in variables section and verified with response data byte, and verified invalid request data byte given as invalid_os_name in variable section. Since it is non-volatile, the response bytes are verified with os_version_name after cold reset.
For param 4 - Operating System Name, the request data bytes are identified in variables section and verified with response data byte, and verified invalid request data byte given as invalid_os_name in variable section. Since it is volatile, the response bytes are verified with default value after cold reset.
For param 5 - Present OS Version Number, the request data bytes are identified in variables section and verified with response data byte, and verified invalid request data byte given as invalid_os_name in variable section.
Request data for system info parameter present in data/ipmi_raw_cmd_table.py
Functions used like 'Prefix Bytes' are defined under lib/ipmi_utils.py and 'Split String With Index' in lib/utils.py - already committed in - https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/51641.
Tested: Run robot ipmi\test_ipmi_systeminfo_parameters.robot
Signed-off-by: chithrag <chithrag@ami.com>
Change-Id: Ic0016db9d3707cac496a5b9dbc15ac0f348a51a4
diff --git a/data/ipmi_raw_cmd_table.py b/data/ipmi_raw_cmd_table.py
index 4198cf4..4b68d4f 100644
--- a/data/ipmi_raw_cmd_table.py
+++ b/data/ipmi_raw_cmd_table.py
@@ -462,5 +462,99 @@
"Insufficient privilege level",
"Reservation cancelled or invalid",
]
+ },
+ 'System_Info':
+ {
+ 'param0_Set_In_Progress':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x00 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x00 0x00",
+ "Request data length invalid",
+ "Invalid data field in request",
+ ],
+ },
+ 'param1_System_Firmware_Version':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x01 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x01 0x00 0x00 0x0e",
+ "Invalid data field in request",
+ ],
+ },
+ 'param2_System_Name':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x02 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x02 0x00 0x00 0x0e",
+ "Invalid data field in request",
+ ],
+ },
+ 'param3_Primary_Operating_System_Name':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x03 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x03 0x00 0x00 0x0e",
+ "Invalid data field in request",
+ ],
+ },
+ 'param4_Operating_System_Name':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x04 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x04 0x00 0x00 0x0e",
+ "Invalid data field in request",
+ ],
+ },
+ 'param5_Present_OS_Version_number':
+ {
+ 'Get':
+ [
+ # raw command, expected output(s)
+ "0x06 0x59 0x00 0x05 0x00 0x00",
+ "Request data length invalid",
+ ],
+ 'Set':
+ [
+ # raw command, expected output(s)
+ "0x06 0x58 0x05 0x00 0x00 0x0e",
+ "Invalid data field in request",
+ ]
+ }
}
}