Add IPMI Sensor ID test cases for:

- boot progress
- operatingsystemstate
- OCCActive Enable and Disable

Creating new Templates for Functional, Not Functional,
Present, Not Present, Boot Progress and
Operating System State.
Keeping the same for DIMM as the IPMI commands are different.

Also, move "Verify IPMI BT Capabilities Command" from
tests/test_sensor.robot to tests/ipmi/test_sensor_ipmi.robot

Resolves openbmc/openbmc-test-automation#1159

Change-Id: I35269c251a9614bb5a73dec5247a81ccd1e00cf6
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/data/variables.py b/data/variables.py
index d498f84..afa48a3 100644
--- a/data/variables.py
+++ b/data/variables.py
@@ -84,7 +84,7 @@
 ALWAYS_POWER_ON = CONTROL_DBUS_BASE + 'Power.RestorePolicy.Policy.AlwaysOn'
 ALWAYS_POWER_OFF = CONTROL_DBUS_BASE + 'Power.RestorePolicy.Policy.AlwaysOff'
 
-# Dump URI variable
+# Dump URI variables.
 DUMP_URI = OPENBMC_BASE_URI +'/dump/'
 DUMP_ENTRY_URI = DUMP_URI + 'entry/'
 # The path on the BMC where dumps are stored.
@@ -94,7 +94,20 @@
 STATE_DBUS_BASE = 'xyz.openbmc_project.State.'
 OS_BOOT_START = STATE_DBUS_BASE + 'Boot.Progress.ProgressStages.OSStart'
 OS_BOOT_OFF = STATE_DBUS_BASE + 'Boot.Progress.ProgressStages.Unspecified'
+OS_BOOT_PCI = STATE_DBUS_BASE + 'Boot.Progress.ProgressStages.PCIInit'
+OS_BOOT_SECPCI = STATE_DBUS_BASE + \
+      'Boot.Progress.ProgressStages.SecondaryProcInit'
+OS_BOOT_MEM = STATE_DBUS_BASE + 'Boot.Progress.ProgressStages.MemoryInit'
+OS_BOOT_MOTHERBOARD = STATE_DBUS_BASE + \
+      'Boot.Progress.ProgressStages.MotherboardInit'
+
+# OperatingSystem status variables.
 OS_BOOT_COMPLETE = STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.BootComplete'
+OS_BOOT_CDROM =  STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.CDROMBoot'
+OS_BOOT_ROM = STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.ROMBoot'
+OS_BOOT_PXE = STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.PXEBoot'
+OS_BOOT_CBoot = STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.CBoot'
+OS_BOOT_DiagBoot = STATE_DBUS_BASE + 'OperatingSystem.Status.OSStatus.DiagBoot'
 
 # Boot variables.
 BOOT_SOURCE_DEFAULT = 'xyz.openbmc_project.Control.Boot.Source.Sources.Default'
diff --git a/tests/ipmi/test_sensors_ipmi.robot b/tests/ipmi/test_sensors_ipmi.robot
index f549d4d..33ddf67 100644
--- a/tests/ipmi/test_sensors_ipmi.robot
+++ b/tests/ipmi/test_sensors_ipmi.robot
@@ -15,7 +15,7 @@
 *** Test Cases ***
 
 DIMM Present And Not Present
-    [Documentation]  Verify the IPMI sensor for present and not present.
+    [Documentation]  Verify the IPMI sensor for DIMM3 present and not present.
     [Tags]  DIMM_Present_And_Not_Present
 
     # Set the dimm3 Present to 1
@@ -31,7 +31,7 @@
     ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3  Present  ${0}
 
 DIMM Functional And Not Functional
-    [Documentation]  Verify that the DIMM is Functional.
+    [Documentation]  Verify that the DIMM3 is functional.
     [Tags]  DIMM_Functional_And_Not_Functional
 
     # Set the dimm3 Functional to 0
@@ -40,7 +40,6 @@
     Verify The Attribute
     ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
     ...  Functional  ${0}
-
     # Set the dimm3 Functional to 1
     Run IPMI Command
     ...  0x04 0x30 0xac 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x20 0x00
@@ -48,111 +47,231 @@
     ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/dimm3
     ...  Functional  ${1}
 
-CPU Present And Not Present
-    [Documentation]  Verify the IPMI sensor for present and not present.
-    [Tags]  CPU_Present_And_Not_Present
+CPU Present
+    [Documentation]  Verify the IPMI sensor for CPU present.
 
-    # Set the cpu0 Present to 1
-    Run IPMI Command
-    ...  0x04 0x30 0x5a 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0  Present  ${1}
+    # SensorID  Component
+    0x5a        cpu0
 
-    # Set the cpu0 Present to 0
-    Run IPMI Command
-    ...  0x04 0x30 0x5a 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0  Present  ${0}
+    [Template]  Check Present Bit
+    [Tags]  CPU_Present
 
-CPU Functional And Not Functional
-    [Documentation]  Verify that the CPU is Functional.
-    [Tags]  CPU_Functional_And_Not_Functional
+CPU Not Present
+    [Documentation]  Verify the IPMI sensor for CPU not present.
 
-    # Set the cpu0 Functional to 0
-    Run IPMI Command
-    ...  0x04 0x30 0x5a 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0
-    ...  Functional  ${0}
+    # SensorID  Component
+    0x5a        cpu0
 
-    # Set the cpu0 Functional to 1
-    Run IPMI Command
-    ...  0x04 0x30 0x5a 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0
-    ...  Functional  ${1}
+    [Template]  Check Not Present Bit
+    [Tags]  CPU_Not_Present
 
-Core Present And Not Present
-    [Documentation]  Verify the IPMI sensor for present and not present.
-    [Tags]  Core_Present_And_Not_Present
+CPU Functional
+    [Documentation]  Verify the IPMI sensor for CPU functional.
 
-    # Set the Core Present to 1
-    Run IPMI Command
-    ...  0x04 0x30 0x1e 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
-    ...  Present  ${1}
+    # SensorID  Component
+    0x5a        cpu0
 
-    # Set the core4 of cpu0 Present to 0
-    Run IPMI Command
-    ...  0x04 0x30 0x1e 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
-    ...  Present  ${0}
+    [Template]  Check Functional Bit
+    [Tags]  CPU_Functional
 
-Core Functional And Not Functional
-    [Documentation]  Verify that the Core is Functional.
-    [Tags]  Core_Functional_And_Not_Functional
+CPU Not Functional
+    [Documentation]  Verify the IPMI sensor for CPU not functional.
 
-    # Set the core4 of cpu0 Functional to 0
-    Run IPMI Command
-    ...  0x04 0x30 0x1e 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
-    ...  Functional  ${0}
+    # SensorID  Component
+    0x5a        cpu0
 
-    # Set the core4 of cpu0 Functional to 1
-    Run IPMI Command
-    ...  0x04 0x30 0x1e 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/cpu0/core4
-    ...  Functional  ${1}
+    [Template]  Check Not Functional Bit
+    [Tags]  CPU_Not_Functional
 
-GPU Present And Not Present
-    [Documentation]  Verify the IPMI sensor for present and not present.
-    [Tags]  GPU_Present_And_Not_Present
+GPU Present
+    [Documentation]  Verify the IPMI sensor for GPU present.
 
-    # Set GPU card0 Present to 1
-    Run IPMI Command
-    ...  0x04 0x30 0xC5 0xa9 0x00 0x80 0x00 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
-    ...  Present  ${1}
+    # SensorID  Component
+    0xC5        gv100card0
 
-    # Set the GPU card0 Present to 0
-    Run IPMI Command
-    ...  0x04 0x30 0xC5 0xa9 0x00 0x00 0x00 0x80 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
-    ...  Present  ${0}
+    [Template]  Check Present Bit
+    [Tags]  GPU_Present
 
-GPU Functional And Not Functional
-    [Documentation]  Verify that the GPU is Functional.
-    [Tags]  GPU_Functional_And_Not_Functional
+GPU Not Present
+    [Documentation]  Verify the IPMI sensor for GPU not present.
 
-    # Set the GPU card0 Functional to 0
-    Run IPMI Command
-    ...  0x04 0x30 0xC5 0xa9 0xff 0x00 0x01 0x00 0x00 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
-    ...  Functional  ${0}
+    # SensorID  Component
+    0xC5        gv100card0
 
-    # Set the GPU card0 Functional to 1
-    Run IPMI Command
-    ...  0x04 0x30 0xC5 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x20 0x00
-    Verify The Attribute
-    ...  ${HOST_INVENTORY_URI}system/chassis/motherboard/gv100card0
-    ...  Functional  ${1}
+    [Template]  Check Not Present Bit
+    [Tags]  GPU_Not_Present
+
+GPU Functional
+    [Documentation]  Verify the IPMI sensor GPU for functional.
+
+    # SensorID  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
+
+    [Template]  Check Not Functional Bit
+    [Tags]  GPU_Not_Functional
+
+Core Present
+    [Documentation]  Verify the IPMI sensor for core present.
+
+    # SensorID  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
+
+    [Template]  Check Not Present Bit
+    [Tags]  Core_Not_Present
+
+Core Functional
+    [Documentation]  Verify the IPMI sensor for core functional.
+
+    # SensorID  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
+
+    [Template]  Check Not Functional Bit
+    [Tags]  Core_Not_Functional
+
+# Operating System State Test Cases.
+
+Set BootProgress To OSStart And Verify
+    [Documentation]  Set BootProgress To OSStart and verify.
+
+    # BootProgressID  BootProgress
+    0x13              ${OS_BOOT_START}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x02                      ${OS_BOOT_CBoot}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x05                      ${OS_BOOT_PXE}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x40                      ${OS_BOOT_COMPLETE}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x10                      ${OS_BOOT_CDROM}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x20                      ${OS_BOOT_ROM}
+
+    [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.
+
+    # OperatingSystemStateID  OperatingSystemState
+    0x08                      ${OS_BOOT_DiagBoot}
+
+    [Template]  Check OperatingSystemState
+    [Tags]  Set_OperatingSystemState_To_DiagBoot_And_Verify
+
+# Boot Progress Test Cases.
+
+Set BootProgress To MemoryInit And Verify
+    [Documentation]  Set BootProgress To MemoryInit and verify.
+
+    # BootProgressID  BootProgress
+    0x01              ${OS_BOOT_MEM}
+
+    [Template]  Check BootProgress
+    [Tags]  Set_BootProgress_To_MemoryInit_And_Verify
+
+Set BootProgress To MemoryInit And Verify
+    [Documentation]  Set BootProgress To MemoryInit and verify.
+
+    # BootProgressID  BootProgress
+    0x14              ${OS_BOOT_MOTHERBOARD}
+
+    [Template]  Check BootProgress
+    [Tags]  Set_BootProgress_To_MotherboardInit_And_Verify
+
+Set BootProgress To SecondaryProcInit And Verify
+    [Documentation]  Set BootProgress To SecondaryProcInit and verify.
+
+    # BootProgressID  BootProgress
+    0x03              ${OS_BOOT_SECPCI}
+
+    [Template]  Check BootProgress
+    [Tags]  Set_BootProgress_To_SecondaryProcInit_And_Verify
+
+Set BootProgress To PCIinit And Verify
+    [Documentation]  Set BootProgress To PCIinit and verify.
+
+    #BootProgressID  BootProgress
+    0x07             ${OS_BOOT_PCI}
+
+    [Template]  Check BootProgress
+    [Tags]  Set_BootProgress_To_PCIinit_And_Verify
+
+Set BootProgress To Unspecified And Verify
+    [Documentation]  Set BootProgress To Unspecified and verify.
+
+    # BootProgressID  BootProgress
+    0x00              ${OS_BOOT_OFF}
+
+    [Template]  Check BootProgress
+    [Tags]  Set_BootProgress_To_Unspecified_And_Verify
 
 TPM Enable and Disable
     [Documentation]  Enable and disable TPM.
@@ -182,30 +301,91 @@
     ...  0x04 0x30 0xDA 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 0x00
     Verify The Attribute  ${CONTROL_URI}/host0/auto_reboot  AutoReboot  ${1}
 
-OS Status Sensor Progress
-    [Documentation]  OS Status Sensor Progress.
-    [Tags]  OS_Status_Sensor_Progress
+OccActive Enable And Disable
+    [Documentation]  OCC Active Enable And Disable.
+    [Tags]  OCC_Active_Enable_And_Disable
 
-    # Set the OS Sensor Progress to PXEBoot
+    # Set the OccActive to 1
     Run IPMI Command
-    ...  0x04 0x30 0x05 0x00 0x00 0x04 0x00 0x00 0x00 0x00 0x20 0x00
-    ${resp}=  Read Attribute  ${SYSTEM_STATE_URI}/host0  OperatingSystemState
-    Should Be Equal
-    ...  xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot
-    ...  ${resp}
+    ...  0x04 0x30 0x08 0xa8 0x00 0x02 0x00 0x01 0x00 0x00 0x00 0x00
+    Verify The Attribute  ${OPENPOWER_CONTROL}/occ0  OccActive  ${1}
 
-Boot Progress Sensor Unspecified Error
-    [Documentation]  Boot Progress Sensor Unspecified Error.
-    [Tags]  Boot_Progress_Sensor_Unspecified_Error
-
-    # Set the Boot Progress as Unspecified
+    # Set the OccActive to 0
     Run IPMI Command
-    ...  0x04 0x30 0x03 0xa9 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00
-    ${resp}=  Read Attribute  ${SYSTEM_STATE_URI}/host0  BootProgress
-    Should Be Equal  ${OS_BOOT_OFF}  ${resp}
+    ...  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
+    [Setup]  REST Power On
+
+    ${output} =  Run IPMI command  0x06 0x36
+    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}
+
+    Run IPMI Command
+    ...  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}
+
+Check Not Present Bit
+    [Documentation]  Set the present field to 1 and verify.
+    [Arguments]  ${Sensor_id}  ${Comp}
+
+    Run IPMI Command
+    ...  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}
+
+Check Functional Bit
+    [Documentation]  Set the functional to 1 and verify.
+    [Arguments]  ${Sensor_id}  ${Comp}
+
+    Run IPMI Command
+    ...  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}
+
+Check Not Functional Bit
+    [Documentation]  Set the functional to 0 and verify.
+    [Arguments]  ${Sensor_id}  ${Comp}
+
+    Run IPMI Command
+    ...  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}
+
+Check OperatingSystemState
+    [Documentation]  Set OperatingSystemState and verify.
+    [Arguments]  ${Sensor_ID}  ${OperatingSystemState}
+    # Description of argument(s):
+    # ${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
+
+    Run IPMI Command
+    ...  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:
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index 50f86b9..e1222b6 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -13,9 +13,9 @@
 Resource               ../lib/boot_utils.robot
 Resource               ../lib/utils.robot
 
-Suite Setup            Setup The Suite
+Suite Setup            Suite Setup Execution
 Test Setup             Open Connection And Log In
-Test Teardown          Post Test Case Execution
+Test Teardown          Test Teardown Execution
 
 *** Variables ***
 
@@ -24,15 +24,6 @@
 
 *** Test Cases ***
 
-Verify IPMI BT Capabilities Command
-    [Documentation]  Verify IPMI BT capability command response.
-    [Tags]  Verify_IPMI_BT_Capabilities_Command
-    [Setup]  REST Power On
-
-    ${output}=  Run IPMI command  0x06 0x36
-    Should Be True  "${output}" == " 01 3f 3f 0a 01"
-    ...  msg=Incorrect Output
-
 io_board Present
     [Tags]  io_board_Present
     ${uri}=  Get System component  io_board
@@ -45,7 +36,7 @@
 
 *** Keywords ***
 
-Setup The Suite
+Suite Setup Execution
     [Documentation]  Initial suite setup.
 
     # Boot Host.
@@ -73,7 +64,7 @@
     ${output}=  Read Attribute  ${uri}  ${parm}
     Should Be Equal  ${value}  ${output}
 
-Post Test Case Execution
+Test Teardown Execution
     [Documentation]  Do the post test teardown.
     ...  1. Capture FFDC on test failure.
     ...  2. Close all open SSH connections.