Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test PLDM base commands. |
| 4 | Library ../lib/pldm_utils.py |
| 5 | Variables ../data/pldm_variables.py |
| 6 | Resource ../lib/openbmc_ffdc.robot |
| 7 | |
| 8 | Test Setup Printn |
| 9 | Test Teardown FFDC On Test Case Fail |
| 10 | |
| 11 | |
| 12 | *** Test Cases *** |
Sridevi Ramesh | 039bc76 | 2020-03-30 09:59:07 -0500 | [diff] [blame] | 13 | |
Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 14 | Verify Get PLDM Types |
| 15 | [Documentation] Verify supported PLDM types. |
| 16 | [Tags] Verify_Get_PLDM_Types |
| 17 | |
| 18 | ${pldm_output}= Pldmtool base GetPLDMTypes |
| 19 | Valid List pldm_output['supported_types']['text'] required_values=${PLDM_SUPPORTED_TYPES} |
| 20 | |
Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 21 | Verify Get PLDM Version For Base |
| 22 | [Documentation] Verify supported PLDM version for base type. |
| 23 | [Tags] Verify_Get_PLDM_Version_For_Base |
| 24 | |
| 25 | ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'base' |
| 26 | ${pldm_output}= Pldmtool ${pldm_cmd} |
Michael Walsh | 06de1f7 | 2020-02-17 14:28:24 -0600 | [diff] [blame] | 27 | Valid Value pldm_output['type_0(base)'] ['${VERSION_BASE['STRING']}'] |
Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 28 | |
| 29 | |
| 30 | Verify Get PLDM Version For Platform |
| 31 | [Documentation] Verify supported PLDM version for platform type. |
| 32 | [Tags] Verify_Get_PLDM_Version_For_Platform |
| 33 | |
| 34 | ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'platform' |
| 35 | ${pldm_output}= Pldmtool ${pldm_cmd} |
Michael Walsh | 06de1f7 | 2020-02-17 14:28:24 -0600 | [diff] [blame] | 36 | Valid Value pldm_output['type_2(platform)'] ['${VERSION_PLATFORM['STRING']}'] |
Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 37 | |
| 38 | |
| 39 | Verify Get PLDM Version For BIOS |
| 40 | [Documentation] Verify supported PLDM version for BIOS type. |
| 41 | [Tags] Verify_Get_PLDM_Version_For_BIOS |
| 42 | |
| 43 | ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'bios' |
| 44 | ${pldm_output}= Pldmtool ${pldm_cmd} |
Michael Walsh | 06de1f7 | 2020-02-17 14:28:24 -0600 | [diff] [blame] | 45 | Valid Value pldm_output['type_3(bios)'] ['${VERSION_BIOS['STRING']}'] |
Rahul Maheshwari | 4d48857 | 2019-12-10 23:53:05 -0600 | [diff] [blame] | 46 | |
| 47 | |
| 48 | Verify Get PLDM Version For FRU |
| 49 | [Documentation] Verify supported PLDM version for FRU type. |
| 50 | [Tags] Verify_Get_PLDM_Version_For_FRU |
| 51 | |
| 52 | ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'fru' |
| 53 | ${pldm_output}= Pldmtool ${pldm_cmd} |
Michael Walsh | 06de1f7 | 2020-02-17 14:28:24 -0600 | [diff] [blame] | 54 | Valid Value pldm_output['type_4(fru)'] ['${VERSION_FRU['STRING']}'] |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 55 | |
Sridevi Ramesh | 92041a3 | 2020-04-22 02:29:31 -0500 | [diff] [blame] | 56 | |
| 57 | Verify Get PLDM Version For OEM |
| 58 | [Documentation] Verify supported PLDM version for oem-ibm type. |
| 59 | [Tags] Verify_Get_PLDM_Version_For_OEM |
| 60 | |
| 61 | ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'oem-ibm' |
| 62 | ${pldm_output}= Pldmtool ${pldm_cmd} |
| 63 | Valid Value pldm_output['type_63(oem-ibm)'] ['${VERSION_OEM['STRING']}'] |
| 64 | |
| 65 | |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 66 | Verify GetTID |
| 67 | [Documentation] Verify GetTID (Terminus ID) response message. |
| 68 | [Tags] Verify_GetTID |
| 69 | |
| 70 | # Example output: |
| 71 | # TID : 1 |
| 72 | |
| 73 | ${pldm_output}= Pldmtool base GetTID |
| 74 | Rprint Vars pldm_output |
| 75 | |
| 76 | Valid Dict pldm_output valid_values={'tid': ['1']} |
Sridevi Ramesh | 039bc76 | 2020-03-30 09:59:07 -0500 | [diff] [blame] | 77 | |
| 78 | Verify GetPLDMCommands |
| 79 | [Documentation] Verify GetPLDMCommands response message. |
| 80 | [Tags] Verify_GetPLDMCommands |
| 81 | [Template] Verify GetPLDMCommands For PLDM Type |
| 82 | |
| 83 | # pldm_type # expected_pldm_cmds |
| 84 | |
| 85 | '0' ${PLDM_BASE_CMDS} |
| 86 | '2' ${PLDM_PLATFORM_CMDS} |
| 87 | '3' ${PLDM_BIOS_CMDS} |
| 88 | '4' ${PLDM_FRU_CMDS} |
Sridevi Ramesh | 92041a3 | 2020-04-22 02:29:31 -0500 | [diff] [blame] | 89 | '63' ${PLDM_OEM_CMDS} |
Sridevi Ramesh | 039bc76 | 2020-03-30 09:59:07 -0500 | [diff] [blame] | 90 | |
| 91 | *** keywords *** |
| 92 | |
| 93 | Verify GetPLDMCommands For PLDM Type |
| 94 | [Documentation] Verify GetPLDMCommands for given input pldm type with expected pldm cmds. |
| 95 | [Arguments] ${pldm_type} ${expected_pldm_cmds} |
| 96 | |
| 97 | # Description of argument(s): |
Sridevi Ramesh | 92041a3 | 2020-04-22 02:29:31 -0500 | [diff] [blame] | 98 | # pldm_type pldm type (e.g. '0', '2', '3', '4', '63'). |
| 99 | # '0' -> base, '2' -> platform, '3' -> 'bios', '4' -> 'fru' |
| 100 | # '63' -> oem-ibm. |
Sridevi Ramesh | 039bc76 | 2020-03-30 09:59:07 -0500 | [diff] [blame] | 101 | # expected_pldm_cmds expected pldm commands for given pldm type. |
| 102 | |
| 103 | # Example output: |
| 104 | # Supported Commands : 2(GetTID) 3(GetPLDMVersion) 4(GetPLDMTypes) 5(GetPLDMCommands) |
| 105 | |
| 106 | ${pldm_output}= Pldmtool base GetPLDMCommands -t ${pldm_type} |
| 107 | Rprint Vars pldm_output |
| 108 | Valid List pldm_output ${expected_pldm_cmds} |