blob: 33ddf672d4d40e4d2501ed3ae4f464cd298d93a8 [file] [log] [blame]
Sweta Potthuri4a556022017-11-24 04:03:37 -06001*** Settings ***
2Documentation Test IPMI sensor IDs
3
4Resource ../../lib/rest_client.robot
5Resource ../../lib/ipmi_client.robot
6Resource ../../lib/openbmc_ffdc.robot
7Resource ../../lib/state_manager.robot
8Library ../../data/model.py
9Resource ../../lib/boot_utils.robot
10Resource ../../lib/utils.robot
11
12Test Setup Open Connection And Log In
13Test Teardown Test Teardown Execution
14
15*** Test Cases ***
16
17DIMM Present And Not Present
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060018 [Documentation] Verify the IPMI sensor for DIMM3 present and not present.
Sweta Potthuri4a556022017-11-24 04:03:37 -060019 [Tags] DIMM_Present_And_Not_Present
20
21 # Set the dimm3 Present to 1
22 Run IPMI Command
23 ... 0x04 0x30 0xac 0xa9 0x00 0x40 0x00 0x00 0x00 0x00 0x20 0x00
24 Verify The Attribute
25 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3 Present ${1}
26
27 # Set the dimm3 Present to 0
28 Run IPMI Command
29 ... 0x04 0x30 0xac 0xa9 0xff 0x00 0x00 0x40 0x00 0x00 0x20 0x00
30 Verify The Attribute
31 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3 Present ${0}
32
33DIMM Functional And Not Functional
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060034 [Documentation] Verify that the DIMM3 is functional.
Sweta Potthuri4a556022017-11-24 04:03:37 -060035 [Tags] DIMM_Functional_And_Not_Functional
36
37 # Set the dimm3 Functional to 0
38 Run IPMI Command
39 ... 0x04 0x30 0xac 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x20 0x00
40 Verify The Attribute
41 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
42 ... Functional ${0}
Sweta Potthuri4a556022017-11-24 04:03:37 -060043 # Set the dimm3 Functional to 1
44 Run IPMI Command
45 ... 0x04 0x30 0xac 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
46 Verify The Attribute
47 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
48 ... Functional ${1}
49
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060050CPU Present
51 [Documentation] Verify the IPMI sensor for CPU present.
Sweta Potthuri4a556022017-11-24 04:03:37 -060052
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060053 # SensorID Component
54 0x5a cpu0
Sweta Potthuri4a556022017-11-24 04:03:37 -060055
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060056 [Template] Check Present Bit
57 [Tags] CPU_Present
Sweta Potthuri4a556022017-11-24 04:03:37 -060058
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060059CPU Not Present
60 [Documentation] Verify the IPMI sensor for CPU not present.
Sweta Potthuri4a556022017-11-24 04:03:37 -060061
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060062 # SensorID Component
63 0x5a cpu0
Sweta Potthuri4a556022017-11-24 04:03:37 -060064
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060065 [Template] Check Not Present Bit
66 [Tags] CPU_Not_Present
Sweta Potthuri4a556022017-11-24 04:03:37 -060067
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060068CPU Functional
69 [Documentation] Verify the IPMI sensor for CPU functional.
Sweta Potthuri4a556022017-11-24 04:03:37 -060070
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060071 # SensorID Component
72 0x5a cpu0
Sweta Potthuri4a556022017-11-24 04:03:37 -060073
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060074 [Template] Check Functional Bit
75 [Tags] CPU_Functional
Sweta Potthuri4a556022017-11-24 04:03:37 -060076
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060077CPU Not Functional
78 [Documentation] Verify the IPMI sensor for CPU not functional.
Sweta Potthuri4a556022017-11-24 04:03:37 -060079
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060080 # SensorID Component
81 0x5a cpu0
Sweta Potthuri4a556022017-11-24 04:03:37 -060082
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060083 [Template] Check Not Functional Bit
84 [Tags] CPU_Not_Functional
Sweta Potthuri4a556022017-11-24 04:03:37 -060085
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060086GPU Present
87 [Documentation] Verify the IPMI sensor for GPU present.
Sweta Potthuri4a556022017-11-24 04:03:37 -060088
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060089 # SensorID Component
90 0xC5 gv100card0
Sweta Potthuri4a556022017-11-24 04:03:37 -060091
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060092 [Template] Check Present Bit
93 [Tags] GPU_Present
Sweta Potthuri4a556022017-11-24 04:03:37 -060094
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060095GPU Not Present
96 [Documentation] Verify the IPMI sensor for GPU not present.
Sweta Potthuri4a556022017-11-24 04:03:37 -060097
Sweta Potthuri09a3cf92017-12-08 01:19:53 -060098 # SensorID Component
99 0xC5 gv100card0
Sweta Potthuri4a556022017-11-24 04:03:37 -0600100
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600101 [Template] Check Not Present Bit
102 [Tags] GPU_Not_Present
103
104GPU Functional
105 [Documentation] Verify the IPMI sensor GPU for functional.
106
107 # SensorID Component
108 0xC5 gv100card0
109
110 [Template] Check Functional Bit
111 [Tags] GPU_Functional
112
113GPU Not Functional
114 [Documentation] Verify the IPMI sensor GPU for not functional.
115
116 # SensorID Component
117 0xC5 gv100card0
118
119 [Template] Check Not Functional Bit
120 [Tags] GPU_Not_Functional
121
122Core Present
123 [Documentation] Verify the IPMI sensor for core present.
124
125 # SensorID Component
126 0x1e cpu0/core4
127
128 [Template] Check Present Bit
129 [Tags] Core_Present
130
131Core Not Present
132 [Documentation] Verify the IPMI sensor for core not present.
133
134 # SensorID Component
135 0x1e cpu0/core4
136
137 [Template] Check Not Present Bit
138 [Tags] Core_Not_Present
139
140Core Functional
141 [Documentation] Verify the IPMI sensor for core functional.
142
143 # SensorID Component
144 0x1e cpu0/core4
145
146 [Template] Check Functional Bit
147 [Tags] Core_Functional
148
149Core Not Functional
150 [Documentation] Verify the IPMI sensor for core not functional.
151
152 # SensorID Component
153 0x1e cpu0/core4
154
155 [Template] Check Not Functional Bit
156 [Tags] Core_Not_Functional
157
158# Operating System State Test Cases.
159
160Set BootProgress To OSStart And Verify
161 [Documentation] Set BootProgress To OSStart and verify.
162
163 # BootProgressID BootProgress
164 0x13 ${OS_BOOT_START}
165
166 [Template] Check BootProgress
167 [Tags] Set_BootProgress_To_OSStart_And_Verify
168
169Set OperatingSystemState To CBoot And Verify
170 [Documentation] Set Operating System State to "CBoot"
171 ... and verify using REST.
172
173 # OperatingSystemStateID OperatingSystemState
174 0x02 ${OS_BOOT_CBoot}
175
176 [Template] Check OperatingSystemState
177 [Tags] Set_OperatingSystemState_To_CBoot_And_Verify
178
179Set OperatingSystemState To PXEBoot And Verify
180 [Documentation] Set Operating System State to "PXEBoot"
181 ... and verify using REST.
182
183 # OperatingSystemStateID OperatingSystemState
184 0x05 ${OS_BOOT_PXE}
185
186 [Template] Check OperatingSystemState
187 [Tags] Set_OperatingSystemState_To_PXEBoot_And_Verify
188
189Set OperatingSystemState To BootComplete And Verify
190 [Documentation] Set Operating System State to "BootComplete"
191 ... and verify using REST.
192
193 # OperatingSystemStateID OperatingSystemState
194 0x40 ${OS_BOOT_COMPLETE}
195
196 [Template] Check OperatingSystemState
197 [Tags] Set_OperatingSystemState_To_BootComplete_And_Verify
198
199Set OperatingSystemState To CDROMBoot And Verify
200 [Documentation] Set Operating System State to "CDROMBoot"
201 ... and verify using REST.
202
203 # OperatingSystemStateID OperatingSystemState
204 0x10 ${OS_BOOT_CDROM}
205
206 [Template] Check OperatingSystemState
207 [Tags] Set_OperatingSystemState_To_CDROMBoot_And_Verify
208
209Set OperatingSystemState To ROMBoot And Verify
210 [Documentation] Set Operating System State to "ROMBoot"
211 ... and verify using REST.
212
213 # OperatingSystemStateID OperatingSystemState
214 0x20 ${OS_BOOT_ROM}
215
216 [Template] Check OperatingSystemState
217 [Tags] Set_OperatingSystemState_To_ROMBoot_And_Verify
218
219Set OperatingSystemState To DiagBoot And Verify
220 [Documentation] Set Operating System State to "DiagBoot"
221 ... and verify using REST.
222
223 # OperatingSystemStateID OperatingSystemState
224 0x08 ${OS_BOOT_DiagBoot}
225
226 [Template] Check OperatingSystemState
227 [Tags] Set_OperatingSystemState_To_DiagBoot_And_Verify
228
229# Boot Progress Test Cases.
230
231Set BootProgress To MemoryInit And Verify
232 [Documentation] Set BootProgress To MemoryInit and verify.
233
234 # BootProgressID BootProgress
235 0x01 ${OS_BOOT_MEM}
236
237 [Template] Check BootProgress
238 [Tags] Set_BootProgress_To_MemoryInit_And_Verify
239
240Set BootProgress To MemoryInit And Verify
241 [Documentation] Set BootProgress To MemoryInit and verify.
242
243 # BootProgressID BootProgress
244 0x14 ${OS_BOOT_MOTHERBOARD}
245
246 [Template] Check BootProgress
247 [Tags] Set_BootProgress_To_MotherboardInit_And_Verify
248
249Set BootProgress To SecondaryProcInit And Verify
250 [Documentation] Set BootProgress To SecondaryProcInit and verify.
251
252 # BootProgressID BootProgress
253 0x03 ${OS_BOOT_SECPCI}
254
255 [Template] Check BootProgress
256 [Tags] Set_BootProgress_To_SecondaryProcInit_And_Verify
257
258Set BootProgress To PCIinit And Verify
259 [Documentation] Set BootProgress To PCIinit and verify.
260
261 #BootProgressID BootProgress
262 0x07 ${OS_BOOT_PCI}
263
264 [Template] Check BootProgress
265 [Tags] Set_BootProgress_To_PCIinit_And_Verify
266
267Set BootProgress To Unspecified And Verify
268 [Documentation] Set BootProgress To Unspecified and verify.
269
270 # BootProgressID BootProgress
271 0x00 ${OS_BOOT_OFF}
272
273 [Template] Check BootProgress
274 [Tags] Set_BootProgress_To_Unspecified_And_Verify
Sweta Potthuri4a556022017-11-24 04:03:37 -0600275
276TPM Enable and Disable
277 [Documentation] Enable and disable TPM.
278 [Tags] TPM_Enable_and_Disable
279
280 # Set the TPMEnable to 0
281 Run IPMI Command
282 ... 0x04 0x30 0xD7 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
283 Verify The Attribute ${CONTROL_URI}/host0/TPMEnable TPMEnable ${0}
284
285 # Set the TPMEnable to 1
286 Run IPMI Command
287 ... 0x04 0x30 0xD7 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
288 Verify The Attribute ${CONTROL_URI}/host0/TPMEnable TPMEnable ${1}
289
290Autoreboot Enable and Disable
291 [Documentation] Enable and disable Autoreboot.
292 [Tags] Autoreboot_Enable_and_Disable
293
294 # Set the TPMEnable to 0
295 Run IPMI Command
296 ... 0x04 0x30 0xDA 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x20 0x00
297 Verify The Attribute ${CONTROL_URI}/host0/auto_reboot AutoReboot ${0}
298
299 # Set the TPMEnable to 1
300 Run IPMI Command
301 ... 0x04 0x30 0xDA 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
302 Verify The Attribute ${CONTROL_URI}/host0/auto_reboot AutoReboot ${1}
303
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600304OccActive Enable And Disable
305 [Documentation] OCC Active Enable And Disable.
306 [Tags] OCC_Active_Enable_And_Disable
Sweta Potthuri4a556022017-11-24 04:03:37 -0600307
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600308 # Set the OccActive to 1
Sweta Potthuri4a556022017-11-24 04:03:37 -0600309 Run IPMI Command
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600310 ... 0x04 0x30 0x08 0xa8 0x00 0x02 0x00 0x01 0x00 0x00 0x00 0x00
311 Verify The Attribute ${OPENPOWER_CONTROL}/occ0 OccActive ${1}
Sweta Potthuri4a556022017-11-24 04:03:37 -0600312
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600313 # Set the OccActive to 0
Sweta Potthuri4a556022017-11-24 04:03:37 -0600314 Run IPMI Command
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600315 ... 0x04 0x30 0x08 0xa8 0x00 0x01 0x00 0x02 0x00 0x00 0x00 0x00
316 Verify The Attribute ${OPENPOWER_CONTROL}/occ0 OccActive ${0}
317
318Verify IPMI BT Capabilities Command
319 [Documentation] Verify IPMI BT capability command response.
320 [Tags] Verify_IPMI_BT_Capabilities_Command
321 [Setup] REST Power On
322
323 ${output} = Run IPMI command 0x06 0x36
324 Should Be True "${output}" == " 01 3f 3f 0a 01"
325 ... msg=Incorrect Output.
Sweta Potthuri4a556022017-11-24 04:03:37 -0600326
327*** Keywords ***
328
Sweta Potthuri09a3cf92017-12-08 01:19:53 -0600329Check Present Bit
330 [Documentation] Set the present field to 1 and verify.
331 [Arguments] ${Sensor_id} ${Comp}
332
333 Run IPMI Command
334 ... 0x04 0x30 ${Sensor_id} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
335 Verify The Attribute
336 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Present ${1}
337
338Check Not Present Bit
339 [Documentation] Set the present field to 1 and verify.
340 [Arguments] ${Sensor_id} ${Comp}
341
342 Run IPMI Command
343 ... 0x04 0x30 ${Sensor_id} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
344 Verify The Attribute
345 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Present ${0}
346
347Check Functional Bit
348 [Documentation] Set the functional to 1 and verify.
349 [Arguments] ${Sensor_id} ${Comp}
350
351 Run IPMI Command
352 ... 0x04 0x30 ${Sensor_id} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
353 Verify The Attribute
354 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Functional ${1}
355
356Check Not Functional Bit
357 [Documentation] Set the functional to 0 and verify.
358 [Arguments] ${Sensor_id} ${Comp}
359
360 Run IPMI Command
361 ... 0x04 0x30 ${Sensor_id} 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
362 Verify The Attribute
363 ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Functional ${0}
364
365Check OperatingSystemState
366 [Documentation] Set OperatingSystemState and verify.
367 [Arguments] ${Sensor_ID} ${OperatingSystemState}
368 # Description of argument(s):
369 # ${Sensor_ID} Corresponding to OperatingSystemState
370 # ${OperatingSystemState} OperatingSystemState to be set
371
372 Run IPMI Command
373 ... 0x04 0x30 0x05 0xa9 0x00 ${sensor_id} 0x00 0x00 0x00 0x00 0x00 0x00
374 ${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 OperatingSystemState
375 Should Be Equal ${OperatingSystemState} ${resp}
376
377Check BootProgress
378 [Documentation] Set the Bootprogress and verify.
379 [Arguments] ${BootProgressID} ${BootProgress}
380 # Description of argument(s):
381 # ${Sensor_ID} Corresponding to BootProgress
382 # ${BootProgress} BootProgress to be set
383
384 Run IPMI Command
385 ... 0x04 0x30 0x03 0xa8 0x00 0x04 0x00 0x00 0x00 0x00 ${BootProgressID} 0x00
386 ${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 BootProgress
387 Should Be Equal ${BootProgress} ${resp}
388
Sweta Potthuri4a556022017-11-24 04:03:37 -0600389Verify The Attribute
390 [Arguments] ${uri} ${parm} ${value}
391 # Description of arguments:
392 # ${uri} URI path.
393 # ${parm} Attribute.
394 # ${value} Output to be compared.
395
396 ${output}= Read Attribute ${uri} ${parm}
397 Should Be Equal ${value} ${output}
398
399Test Teardown Execution
400 [Documentation] Do the post test teardown.
401 ... 1. Capture FFDC on test failure.
402 ... 2. Close all open SSH connections.
403
404 FFDC On Test Case Fail
405 Close All Connections
406