Fix sensor_id value in test_sensors_ipmi.robot
Very minor issues:
- In keyword "Check OperatingSystemState", ${Sensor_ID} is declared
as an argument but in the code at line 373 ${sensor_id} is used.
- Adjust formatting to conform to coding guidelines.
Resolves openbmc/openbmc-test-automation#1216
Change-Id: I6a5e64df0cbfe3ff4e1647a5a12bb5fcdb952930
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
diff --git a/tests/ipmi/test_sensors_ipmi.robot b/tests/ipmi/test_sensors_ipmi.robot
index 7831e00..d71753c 100644
--- a/tests/ipmi/test_sensors_ipmi.robot
+++ b/tests/ipmi/test_sensors_ipmi.robot
@@ -1,5 +1,5 @@
*** Settings ***
-Documentation Test IPMI sensor IDs
+Documentation Test IPMI sensor IDs.
Resource ../../lib/rest_client.robot
Resource ../../lib/ipmi_client.robot
@@ -30,6 +30,7 @@
Verify The Attribute
... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3 Present ${0}
+
DIMM Functional And Not Functional
[Documentation] Verify that the DIMM3 is functional.
[Tags] DIMM_Functional_And_Not_Functional
@@ -47,114 +48,127 @@
... ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
... Functional ${1}
+
CPU Present
[Documentation] Verify the IPMI sensor for CPU present.
- # SensorID Component
- 0x5a cpu0
+ # sensor_id component
+ 0x5a cpu0
[Template] Check Present Bit
[Tags] CPU_Present
+
CPU Not Present
[Documentation] Verify the IPMI sensor for CPU not present.
- # SensorID Component
- 0x5a cpu0
+ # sensor_id component
+ 0x5a cpu0
[Template] Check Not Present Bit
[Tags] CPU_Not_Present
+
CPU Functional
[Documentation] Verify the IPMI sensor for CPU functional.
- # SensorID Component
- 0x5a cpu0
+ # sensor_id component
+ 0x5a cpu0
[Template] Check Functional Bit
[Tags] CPU_Functional
+
CPU Not Functional
[Documentation] Verify the IPMI sensor for CPU not functional.
- # SensorID Component
- 0x5a cpu0
+ # sensor_id component
+ 0x5a cpu0
[Template] Check Not Functional Bit
[Tags] CPU_Not_Functional
+
GPU Present
[Documentation] Verify the IPMI sensor for GPU present.
- # SensorID Component
- 0xC5 gv100card0
+ # sensor_id component
+ 0xC5 gv100card0
[Template] Check Present Bit
[Tags] GPU_Present
+
GPU Not Present
[Documentation] Verify the IPMI sensor for GPU not present.
- # SensorID Component
- 0xC5 gv100card0
+ # sensor_id component
+ 0xC5 gv100card0
[Template] Check Not Present Bit
[Tags] GPU_Not_Present
+
GPU Functional
[Documentation] Verify the IPMI sensor GPU for functional.
- # SensorID Component
- 0xC5 gv100card0
+ # sensor_id component
+ 0xC5 gv100card0
[Template] Check Functional Bit
[Tags] GPU_Functional
+
GPU Not Functional
[Documentation] Verify the IPMI sensor GPU for not functional.
- # SensorID Component
- 0xC5 gv100card0
+ # sensor_id component
+ 0xC5 gv100card0
[Template] Check Not Functional Bit
[Tags] GPU_Not_Functional
+
Core Present
[Documentation] Verify the IPMI sensor for core present.
- # SensorID Component
- 0x1e cpu0/core4
+ # sensor_id component
+ 0x1e cpu0/core4
[Template] Check Present Bit
[Tags] Core_Present
+
Core Not Present
[Documentation] Verify the IPMI sensor for core not present.
- # SensorID Component
- 0x1e cpu0/core4
+ # sensor_id component
+ 0x1e cpu0/core4
[Template] Check Not Present Bit
[Tags] Core_Not_Present
+
Core Functional
[Documentation] Verify the IPMI sensor for core functional.
- # SensorID Component
- 0x1e cpu0/core4
+ # sensor_id component
+ 0x1e cpu0/core4
[Template] Check Functional Bit
[Tags] Core_Functional
+
Core Not Functional
[Documentation] Verify the IPMI sensor for core not functional.
- # SensorID Component
- 0x1e cpu0/core4
+ # sensor_id component
+ 0x1e cpu0/core4
[Template] Check Not Functional Bit
[Tags] Core_Not_Functional
+
# Operating System State Test Cases.
Set BootProgress To OSStart And Verify
@@ -166,6 +180,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_OSStart_And_Verify
+
Set OperatingSystemState To CBoot And Verify
[Documentation] Set Operating System State to "CBoot"
... and verify using REST.
@@ -176,6 +191,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_CBoot_And_Verify
+
Set OperatingSystemState To PXEBoot And Verify
[Documentation] Set Operating System State to "PXEBoot"
... and verify using REST.
@@ -186,6 +202,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_PXEBoot_And_Verify
+
Set OperatingSystemState To BootComplete And Verify
[Documentation] Set Operating System State to "BootComplete"
... and verify using REST.
@@ -196,6 +213,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_BootComplete_And_Verify
+
Set OperatingSystemState To CDROMBoot And Verify
[Documentation] Set Operating System State to "CDROMBoot"
... and verify using REST.
@@ -206,6 +224,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_CDROMBoot_And_Verify
+
Set OperatingSystemState To ROMBoot And Verify
[Documentation] Set Operating System State to "ROMBoot"
... and verify using REST.
@@ -216,6 +235,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_ROMBoot_And_Verify
+
Set OperatingSystemState To DiagBoot And Verify
[Documentation] Set Operating System State to "DiagBoot"
... and verify using REST.
@@ -226,6 +246,7 @@
[Template] Check OperatingSystemState
[Tags] Set_OperatingSystemState_To_DiagBoot_And_Verify
+
# Boot Progress Test Cases.
Set BootProgress To MemoryInit And Verify
@@ -237,6 +258,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_MemoryInit_And_Verify
+
Set BootProgress To MotherboardInit And Verify
[Documentation] Set BootProgress to "MotherboardInit" and verify.
@@ -246,6 +268,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_MotherboardInit_And_Verify
+
Set BootProgress To SecondaryProcInit And Verify
[Documentation] Set BootProgress to "SecondaryProcInit" and verify.
@@ -255,6 +278,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_SecondaryProcInit_And_Verify
+
Set BootProgress To PCIinit And Verify
[Documentation] Set BootProgress to "PCIinit" and verify.
@@ -264,6 +288,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_PCIinit_And_Verify
+
Set BootProgress To Unspecified And Verify
[Documentation] Set BootProgress to "Unspecified" and verify.
@@ -273,6 +298,7 @@
[Template] Check BootProgress
[Tags] Set_BootProgress_To_Unspecified_And_Verify
+
TPM Enable and Disable
[Documentation] Enable and disable TPM.
[Tags] TPM_Enable_and_Disable
@@ -287,6 +313,7 @@
... 0x04 0x30 0xD7 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
Verify The Attribute ${CONTROL_URI}/host0/TPMEnable TPMEnable ${1}
+
Autoreboot Enable and Disable
[Documentation] Enable and disable Autoreboot.
[Tags] Autoreboot_Enable_and_Disable
@@ -301,6 +328,7 @@
... 0x04 0x30 0xDA 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
Verify The Attribute ${CONTROL_URI}/host0/auto_reboot AutoReboot ${1}
+
OccActive Enable And Disable
[Documentation] OCC Active Enable And Disable.
[Tags] OCC_Active_Enable_And_Disable
@@ -315,6 +343,7 @@
... 0x04 0x30 0x08 0xa8 0x00 0x01 0x00 0x02 0x00 0x00 0x00 0x00
Verify The Attribute ${OPENPOWER_CONTROL}/occ0 OccActive ${0}
+
Verify IPMI BT Capabilities Command
[Documentation] Verify IPMI BT capability command response.
[Tags] Verify_IPMI_BT_Capabilities_Command
@@ -324,78 +353,110 @@
Should Be True "${output}" == " 01 3f 3f 0a 01"
... msg=Incorrect Output.
+
*** Keywords ***
Check Present Bit
[Documentation] Set the present field to 1 and verify.
- [Arguments] ${Sensor_id} ${Comp}
+ [Arguments] ${sensor_id} ${component}
+
+ # Description of argument(s):
+ # sensor_id Corresponding to OperatingSystemState.
+ # component Component name.
Run IPMI Command
- ... 0x04 0x30 ${Sensor_id} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
+ ... 0x04 0x30 ${sensor_id} 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
Verify The Attribute
- ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Present ${1}
+ ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component}
+ ... Present ${1}
+
Check Not Present Bit
[Documentation] Set the present field to 1 and verify.
- [Arguments] ${Sensor_id} ${Comp}
+ [Arguments] ${sensor_id} ${component}
+
+ # Description of argument(s):
+ # sensor_id Corresponding to OperatingSystemState.
+ # component Component name.
Run IPMI Command
- ... 0x04 0x30 ${Sensor_id} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
+ ... 0x04 0x30 ${sensor_id} 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
Verify The Attribute
- ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Present ${0}
+ ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component}
+ ... Present ${0}
+
Check Functional Bit
[Documentation] Set the functional to 1 and verify.
- [Arguments] ${Sensor_id} ${Comp}
+ [Arguments] ${sensor_id} ${component}
+
+ # Description of argument(s):
+ # sensor_id Corresponding to OperatingSystemState.
+ # component Component name.
Run IPMI Command
- ... 0x04 0x30 ${Sensor_id} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
+ ... 0x04 0x30 ${sensor_id} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
Verify The Attribute
- ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Functional ${1}
+ ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component}
+ ... Functional ${1}
+
Check Not Functional Bit
[Documentation] Set the functional to 0 and verify.
- [Arguments] ${Sensor_id} ${Comp}
+ [Arguments] ${sensor_id} ${component}
+
+ # Description of argument(s):
+ # sensor_id Corresponding to OperatingSystemState.
+ # component Component name.
Run IPMI Command
- ... 0x04 0x30 ${Sensor_id} 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
+ ... 0x04 0x30 ${sensor_id} 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
Verify The Attribute
- ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${Comp} Functional ${0}
+ ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component}
+ ... Functional ${0}
+
Check OperatingSystemState
[Documentation] Set OperatingSystemState and verify.
- [Arguments] ${Sensor_ID} ${OperatingSystemState}
+ [Arguments] ${sensor_id} ${OperatingSystemState}
+
# Description of argument(s):
- # ${Sensor_ID} Corresponding to OperatingSystemState
- # ${OperatingSystemState} OperatingSystemState to be set
+ # sensor_id Corresponding to OperatingSystemState.
+ # OperatingSystemState OperatingSystemState to be set.
Run IPMI Command
... 0x04 0x30 0x05 0xa9 0x00 ${sensor_id} 0x00 0x00 0x00 0x00 0x00 0x00
${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 OperatingSystemState
Should Be Equal ${OperatingSystemState} ${resp}
+
Check BootProgress
[Documentation] Set the Bootprogress and verify.
[Arguments] ${BootProgressID} ${BootProgress}
+
# Description of argument(s):
- # ${Sensor_ID} Corresponding to BootProgress
- # ${BootProgress} BootProgress to be set
+ # BootProgressID Corresponding to BootProgress.
+ # BootProgress BootProgress to be set.
Run IPMI Command
- ... 0x04 0x30 0x03 0xa8 0x00 0x04 0x00 0x00 0x00 0x00 ${BootProgressID} 0x00
+ ... 0x04 0x30 0x03 0xa8 0x00 0x04 0x00 0x00 0x00 0x00
+ ... ${BootProgressID} 0x00
${resp}= Read Attribute ${SYSTEM_STATE_URI}/host0 BootProgress
Should Be Equal ${BootProgress} ${resp}
+
Verify The Attribute
[Arguments] ${uri} ${parm} ${value}
+
# Description of arguments:
- # ${uri} URI path.
- # ${parm} Attribute.
- # ${value} Output to be compared.
+ # uri URI path.
+ # parm Attribute.
+ # value Output to be compared.
${output}= Read Attribute ${uri} ${parm}
Should Be Equal ${value} ${output}
+
Test Teardown Execution
[Documentation] Do the post test teardown.
... 1. Capture FFDC on test failure.