Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test PLDM platform commands. |
| 4 | |
Sridevi Ramesh | fc3b07f | 2020-02-27 04:22:24 -0600 | [diff] [blame] | 5 | Library ../lib/pldm_utils.py |
| 6 | Variables ../data/pldm_variables.py |
| 7 | Resource ../lib/openbmc_ffdc.robot |
| 8 | Resource ../lib/bmc_redfish_resource.robot |
| 9 | Resource ../lib/boot_utils.robot |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 10 | |
Sridevi Ramesh | fc3b07f | 2020-02-27 04:22:24 -0600 | [diff] [blame] | 11 | Test Setup Printn |
| 12 | Test Teardown FFDC On Test Case Fail |
| 13 | Suite Teardown Pldmtool Platform Suite Cleanup |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Verify GetPDR |
| 18 | [Documentation] Verify GetPDR (Platform Descpritor Record) response message. |
| 19 | [Tags] Verify_GetPDR |
| 20 | [Template] Verify GetPDR For Record Handle |
| 21 | |
| 22 | # RecordHandle |
| 23 | '0' |
| 24 | '1' |
| 25 | '2' |
| 26 | |
| 27 | |
| 28 | Verify SetStateEffecterStates |
| 29 | [Documentation] Verify set state effecter states response message. |
| 30 | [Tags] Verify_SetStateEffecterStates |
| 31 | [Template] Verify SetStateEffecterStates For Effecter States |
| 32 | |
Sridevi Ramesh | ca3223a | 2020-03-11 03:58:58 -0500 | [diff] [blame] | 33 | # EffecterHandle Count EffecterStates (effecterID effecterState) |
| 34 | |
| 35 | '1' '1' '1 1' # (effecterState -> 1 -> 'Boot Not Active') |
| 36 | '1' '1' '1 2' # (effecterState -> 2 -> 'Boot Completed') |
| 37 | '2' '1' '1 9' # (effecterState -> 9 -> 'System Power is in soft off mode') |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 38 | |
| 39 | *** Keywords *** |
| 40 | |
| 41 | Verify GetPDR For Record Handle |
| 42 | [Documentation] Verify GetPDR (Platform Descpritor Record) for given input record handle. |
| 43 | [Arguments] ${record_handle} |
| 44 | |
| 45 | # Description of argument(s): |
Sridevi Ramesh | ca3223a | 2020-03-11 03:58:58 -0500 | [diff] [blame] | 46 | # ${record_handle} Record handle. |
| 47 | # e.g. '1' is record handle 'Boot Progress'. |
| 48 | # '2' is record handle 'System Power State'. |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 49 | |
| 50 | # pldm_output: |
| 51 | # [responseCount]: 29 |
| 52 | # [recordHandle]: 1 |
| 53 | # [PDRHeaderVersion]: 1 |
| 54 | # [PDRType]: 11 |
| 55 | # [recordChangeNumber]: 0 |
| 56 | # [dataLength]: 19 |
| 57 | # [PLDMTerminusHandle]: 0 |
| 58 | # [effecterID]: 1 |
| 59 | # [entityType]: 33 |
| 60 | # [entityInstanceNumber]: 0 |
| 61 | # [containerID]: 0 |
| 62 | # [effecterSemanticID]: 0 |
| 63 | # [effecterInit]: 0 |
| 64 | # [effecterDescriptionPDR]: false |
| 65 | # [compositeEffecterCount]: 1 |
| 66 | # [stateSetID]: 196 |
| 67 | # [possibleStatesSize]: 1 |
| 68 | # [possibleStates]: 6 |
| 69 | |
| 70 | ${pldm_cmd}= Evaluate $CMD_GETPDR % ${record_handle} |
| 71 | ${pldm_output}= Pldmtool ${pldm_cmd} |
| 72 | Rprint Vars pldm_output |
| 73 | Valid Dict pldm_output valid_values=${RESPONSE_DICT_GETPDR} |
| 74 | |
| 75 | |
| 76 | Verify SetStateEffecterStates For Effecter States |
| 77 | [Documentation] Verify set state effecter states for given input effecter states. |
Sridevi Ramesh | ca3223a | 2020-03-11 03:58:58 -0500 | [diff] [blame] | 78 | [Arguments] ${effecter_handle} ${count} ${effecter_states} |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 79 | |
| 80 | # Description of argument(s): |
Sridevi Ramesh | ca3223a | 2020-03-11 03:58:58 -0500 | [diff] [blame] | 81 | # ${effecter_handle} A handle that is used to identify and access the effecter (e.g. '1'). |
| 82 | # e.g. '1' is effecter handle 'Boot Progress'. |
| 83 | # '2' is effecter handle 'System Power State'. |
| 84 | # ${count} The number of individual sets of effecter information (e.g. '1'). |
| 85 | # ${effecter_states} (effecterID effecterState). |
| 86 | # e.g. '1 1'. |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 87 | |
| 88 | # Example output: |
| 89 | # SetStateEffecterStates ]: SUCCESS |
| 90 | |
Sridevi Ramesh | ca3223a | 2020-03-11 03:58:58 -0500 | [diff] [blame] | 91 | ${pldm_cmd}= Evaluate $CMD_SETSTATEEFFECTERSTATES % (${effecter_handle}, ${count}, ${effecter_states}) |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 92 | ${pldm_output}= Pldmtool ${pldm_cmd} |
| 93 | Rprint Vars pldm_output |
| 94 | Valid Value pldm_output['setstateeffecterstates'] ['SUCCESS'] |
Sridevi Ramesh | fc3b07f | 2020-02-27 04:22:24 -0600 | [diff] [blame] | 95 | |
| 96 | |
| 97 | Pldmtool Platform Suite Cleanup |
| 98 | [Documentation] Reset BMC at suite cleanup. |
| 99 | |
| 100 | Redfish OBMC Reboot (off) |