PLDM: Automate below test scenarios for pldmtool oem specific commands
Verify GetPLDMTypes For OEM
Verify GetPLDMVersion For OEM
Verify GetPLDMCommands For OEM
Verify GetAlertStatus
Change-Id: I4802d8f94366e9e48644d7cbaf02daf0f9d35b93
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/data/pldm_variables.py b/data/pldm_variables.py
index 084234a..b762281 100755
--- a/data/pldm_variables.py
+++ b/data/pldm_variables.py
@@ -4,19 +4,20 @@
Contains PLDM-related constants.
"""
-PLDM_SUPPORTED_TYPES = ['base', 'platform', 'bios']
+PLDM_SUPPORTED_TYPES = ['base', 'platform', 'bios', 'fru', 'oem-ibm']
# PLDM types.
PLDM_TYPE_BASE = {'VALUE': '00', 'STRING': 'base'}
PLDM_TYPE_PLATFORM = {'VALUE': '02', 'STRING': 'platform'}
PLDM_TYPE_BIOS = {'VALUE': '03', 'STRING': 'bios'}
PLDM_TYPE_FRU = {'VALUE': '04', 'STRING': 'fru'}
-PLDM_TYPE_OEM = {'VALUE': '3F', 'STRING': 'oem'}
+PLDM_TYPE_OEM = {'VALUE': '63', 'STRING': 'oem-ibm'}
VERSION_BASE = {'VALUE': ['f1', 'f0', 'f0', '00'], 'STRING': '1.0.0'}
VERSION_PLATFORM = {'VALUE': ['f1', 'f2', 'f0', '00'], 'STRING': '1.2.0'}
VERSION_BIOS = {'VALUE': ['f1', 'f1', 'f1', '00'], 'STRING': '1.0.0'}
VERSION_FRU = {'VALUE': ['f1', 'f0', 'f0', '00'], 'STRING': '1.0.0'}
+VERSION_OEM = {'VALUE': ['f1', 'f0', 'f0', '00'], 'STRING': '1.0.0'}
PLDM_BASE_CMDS = ['2(GetTID)', '3(GetPLDMVersion)', '4(GetPLDMTypes)', '5(GetPLDMCommands)']
@@ -25,6 +26,11 @@
'8(GetBIOSAttributeCurrentValueByHandle)', '12(GetDateTime)',
'13(SetDateTime)']
PLDM_FRU_CMDS = ['1(GetFRURecordTableMetadata)', '2(GetFRURecordTable)']
+PLDM_OEM_CMDS = ['1(GetFileTable)', '4(ReadFile)', '5(WriteFile)', '6(ReadFileInToMemory)',
+ '7(WriteFileFromMemory)', '8(ReadFileByTypeIntoMemory)',
+ '9(WriteFileByTypeFromMemory)', '10(NewFileAvailable)',
+ '11(ReadFileByType)', '12(WriteFileByType)', '13(FileAck)',
+ '240(GetAlertStatus)']
# PLDM command format.
diff --git a/pldm/test_pldm_base.robot b/pldm/test_pldm_base.robot
index 70929f4..0b6bbeb 100644
--- a/pldm/test_pldm_base.robot
+++ b/pldm/test_pldm_base.robot
@@ -18,7 +18,6 @@
${pldm_output}= Pldmtool base GetPLDMTypes
Valid List pldm_output['supported_types']['text'] required_values=${PLDM_SUPPORTED_TYPES}
-
Verify Get PLDM Version For Base
[Documentation] Verify supported PLDM version for base type.
[Tags] Verify_Get_PLDM_Version_For_Base
@@ -54,6 +53,16 @@
${pldm_output}= Pldmtool ${pldm_cmd}
Valid Value pldm_output['type_4(fru)'] ['${VERSION_FRU['STRING']}']
+
+Verify Get PLDM Version For OEM
+ [Documentation] Verify supported PLDM version for oem-ibm type.
+ [Tags] Verify_Get_PLDM_Version_For_OEM
+
+ ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'oem-ibm'
+ ${pldm_output}= Pldmtool ${pldm_cmd}
+ Valid Value pldm_output['type_63(oem-ibm)'] ['${VERSION_OEM['STRING']}']
+
+
Verify GetTID
[Documentation] Verify GetTID (Terminus ID) response message.
[Tags] Verify_GetTID
@@ -77,6 +86,7 @@
'2' ${PLDM_PLATFORM_CMDS}
'3' ${PLDM_BIOS_CMDS}
'4' ${PLDM_FRU_CMDS}
+ '63' ${PLDM_OEM_CMDS}
*** keywords ***
@@ -85,8 +95,9 @@
[Arguments] ${pldm_type} ${expected_pldm_cmds}
# Description of argument(s):
- # pldm_type pldm type (e.g. '0', '2', '3', '4').
- # '0' -> base, '2' -> platform, '3' -> 'bios', '4' -> 'fru'.
+ # pldm_type pldm type (e.g. '0', '2', '3', '4', '63').
+ # '0' -> base, '2' -> platform, '3' -> 'bios', '4' -> 'fru'
+ # '63' -> oem-ibm.
# expected_pldm_cmds expected pldm commands for given pldm type.
# Example output:
diff --git a/pldm/test_pldm_oem.robot b/pldm/test_pldm_oem.robot
new file mode 100644
index 0000000..005ed3d
--- /dev/null
+++ b/pldm/test_pldm_oem.robot
@@ -0,0 +1,23 @@
+*** Settings ***
+
+Documentation Module to test PLDM oem commands.
+
+Library ../lib/pldm_utils.py
+Variables ../data/pldm_variables.py
+Resource ../lib/openbmc_ffdc.robot
+
+Test Setup Printn
+Test Teardown FFDC On Test Case Fail
+
+
+*** Test Cases ***
+
+Verify GetAlertStatus
+ [Documentation] Verify get alert status descriptor response message.
+ [Tags] Verify_GetAlertStatus
+
+ ${pldm_output}= Pldmtool oem-ibm GetAlertStatus -i 0
+ Rprint Vars pldm_output
+ Valid Value pldm_output['rack_entry'] ['0xff000030']
+ Valid Value pldm_output['pri_cec_node'] ['0x00008030']
+