blob: 3c1c0a31ea7e38f983d68f32fde239fdcb4e4909 [file] [log] [blame]
Sridevi Rameshfe52e402020-02-05 00:15:24 -06001*** Settings ***
2
3Documentation Module to test PLDM platform commands.
4
Sridevi Rameshfc3b07f2020-02-27 04:22:24 -06005Library ../lib/pldm_utils.py
6Variables ../data/pldm_variables.py
7Resource ../lib/openbmc_ffdc.robot
8Resource ../lib/bmc_redfish_resource.robot
9Resource ../lib/boot_utils.robot
Sridevi Rameshfe52e402020-02-05 00:15:24 -060010
Sridevi Rameshfc3b07f2020-02-27 04:22:24 -060011Test Setup Printn
12Test Teardown FFDC On Test Case Fail
13Suite Teardown Pldmtool Platform Suite Cleanup
Sridevi Rameshfe52e402020-02-05 00:15:24 -060014
15*** Test Cases ***
16
17Verify 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
28Verify SetStateEffecterStates
29 [Documentation] Verify set state effecter states response message.
30 [Tags] Verify_SetStateEffecterStates
31 [Template] Verify SetStateEffecterStates For Effecter States
32
Sridevi Rameshca3223a2020-03-11 03:58:58 -050033 # 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 Rameshfe52e402020-02-05 00:15:24 -060038
39*** Keywords ***
40
41Verify 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 Rameshca3223a2020-03-11 03:58:58 -050046 # ${record_handle} Record handle.
47 # e.g. '1' is record handle 'Boot Progress'.
48 # '2' is record handle 'System Power State'.
Sridevi Rameshfe52e402020-02-05 00:15:24 -060049
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
76Verify SetStateEffecterStates For Effecter States
77 [Documentation] Verify set state effecter states for given input effecter states.
Sridevi Rameshca3223a2020-03-11 03:58:58 -050078 [Arguments] ${effecter_handle} ${count} ${effecter_states}
Sridevi Rameshfe52e402020-02-05 00:15:24 -060079
80 # Description of argument(s):
Sridevi Rameshca3223a2020-03-11 03:58:58 -050081 # ${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 Rameshfe52e402020-02-05 00:15:24 -060087
88 # Example output:
89 # SetStateEffecterStates ]: SUCCESS
90
Sridevi Rameshca3223a2020-03-11 03:58:58 -050091 ${pldm_cmd}= Evaluate $CMD_SETSTATEEFFECTERSTATES % (${effecter_handle}, ${count}, ${effecter_states})
Sridevi Rameshfe52e402020-02-05 00:15:24 -060092 ${pldm_output}= Pldmtool ${pldm_cmd}
93 Rprint Vars pldm_output
94 Valid Value pldm_output['setstateeffecterstates'] ['SUCCESS']
Sridevi Rameshfc3b07f2020-02-27 04:22:24 -060095
96
97Pldmtool Platform Suite Cleanup
98 [Documentation] Reset BMC at suite cleanup.
99
100 Redfish OBMC Reboot (off)