Add field mode check and log collection on failure

Added:
    - Check for field mode before clearing it.
    - FFDC on failure.

Change-Id: I14531ee1802658f7c0a20154a3b439af4ff124e8
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_xit.robot b/tests/test_xit.robot
index 735345a..edd0c3c 100644
--- a/tests/test_xit.robot
+++ b/tests/test_xit.robot
@@ -2,11 +2,16 @@
 Documentation   This suite is for disable field mode if enabled.
 
 Resource        ../lib/code_update_utils.robot
+Resource        ../lib/openbmc_ffdc.robot
 
+Test Teardown   FFDC On Test Case Fail
 
 *** Test Cases ***
 
 Verify Field Mode Is Disable
     [Documentation]  Disable software manager field mode.
 
+    # Field mode is enabled before running CT.
+    # It is to ensure that the setting is not changed during CT
+    Field Mode Should Be Enabled
     Disable Field Mode And Verify Unmount