Basic BMC Performance at BMC READY state

What this changes focus is as follows:
  - BMC File system space check at BMC ready state

Resolves openbmc/openbmc-test-automation#233

Change-Id: I87284c2adc1e266e479ff1cc94186fafb804c5a6
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/extended/code_update/update_bmc.robot b/extended/code_update/update_bmc.robot
index a4b1590..7de2114 100644
--- a/extended/code_update/update_bmc.robot
+++ b/extended/code_update/update_bmc.robot
@@ -32,8 +32,17 @@
 
 *** Test Cases ***
 
-Initiate Code update BMC
+Test Basic BMC Performance Before Code Update
+    [Documentation]   Check performance of memory, CPU & file system of BMC.
+    [Tags]  Test_Basic_BMC_Performance_Before_Code_Update
+    Open Connection And Log In
+    Check BMC CPU Performance
+    Check BMC Mem Performance
+    Check BMC File System Performance
+
+Initiate Code Update BMC
     [Documentation]    BMC code update process initiation
+    [Tags]  Initiate_Code_Update_BMC
 
     Check If File Exist    ${FILE_PATH}
     System Readiness Test
@@ -79,8 +88,13 @@
     Wait Until Keyword Succeeds
     ...    10 min   10 sec   Verify BMC State   BMC_READY
 
-Test BMC CPU Mem Performance at Ready State
-    [Documentation]   Check performance of memory and BMC CPU.
+
+Test Basic BMC Performance At Ready State
+    [Documentation]   Check performance of memory, CPU & file system of BMC.
+    [Tags]  Test_Basic_BMC_Performance_At_Ready_State
     Open Connection And Log In
     Check BMC CPU Performance
     Check BMC Mem Performance
+    Check BMC File System Performance
+
+
diff --git a/lib/utils.robot b/lib/utils.robot
index 66b51d6..c309fc0 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -24,6 +24,9 @@
 ${bmc_mem_total_cmd}=   free | tr -s ' ' | sed '/^Mem/!d' | cut -d" " -f2
 ${bmc_cpu_usage_cmd}=   top -n 1  | grep CPU: | cut -c 7-9
 ${HOST_SETTING}    ${SETTINGS_URI}host0
+# /dev/mtdblock5 filesystem  should be 100% full always
+${bmc_file_system_usage_cmd}=
+...  df -h | grep -v /dev/mtdblock5 | cut -c 52-54 | grep 100 | wc -l
 
 *** Keywords ***
 
@@ -478,6 +481,14 @@
     ...   ${bmc_mem_percentage}/${bmc_mem_total_output}
     Should be true  ${bmc_mem_percentage} > 10
 
+BMC File System Usage Check
+    [Documentation]   Check the file system space. None should be 100% full
+    ...   except /dev/mtdblock5
+    ${bmc_fs_usage_output}  ${stderr}=   Execute Command
+    ...   ${bmc_file_system_usage_cmd}  return_stderr=True
+    Should Be Empty  ${stderr}
+    Should Be True  ${bmc_fs_usage_output}==0
+
 Check BMC CPU Performance
     [Documentation]   Minimal 10% of proc should be free in 3 sample
     :FOR  ${var}  IN Range  1  4
@@ -489,6 +500,12 @@
     :FOR  ${var}  IN Range  1  4
     \     BMC Mem Performance check
 
+Check BMC File System Performance
+    [Documentation]  Check for file system usage for 4 times
+
+    :FOR  ${var}  IN Range  1  4
+    \     BMC File System Usage check
+
 Get Endpoint Paths
     [Documentation]   Returns all url paths ending with given endpoint
     ...               Example: