bugfix: tc063 fails to get the correct result in ubuntu node 13/39713/1
authorrexlee8776 <limingjiang@huawei.com>
Mon, 21 Aug 2017 03:49:03 +0000 (03:49 +0000)
committerrexlee8776 <limingjiang@huawei.com>
Mon, 21 Aug 2017 03:49:03 +0000 (03:49 +0000)
Change-Id: If96dc008d898a77445246aa7e9c98fab160626df
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
yardstick/benchmark/scenarios/storage/storagecapacity.bash

index f963782..96db6e1 100644 (file)
@@ -17,7 +17,7 @@ OUTPUT_FILE=/tmp/storagecapacity-out.log
 # run disk_size test
 run_disk_size()
 {
-    fdisk -l | grep '^Disk.*bytes$' | awk -F [:,\ ] '{print $2,$7}' > $OUTPUT_FILE
+    fdisk -l | grep '^Disk.*bytes' | awk -F [:,\ ] '{print $2,$7}' > $OUTPUT_FILE
 }
 
 # write the disk size to stdout in json format
@@ -35,7 +35,7 @@ output_disk_size()
 run_block_size()
 {
     echo -n "" > $OUTPUT_FILE
-    blkdevices=`fdisk -l | grep '^Disk.*bytes$' | awk -F [:,\ ] '{print $2}'`
+    blkdevices=`fdisk -l | grep '^Disk.*bytes' | awk -F [:,\ ] '{print $2}'`
     blkdevices=($blkdevices)
     for bd in "${blkdevices[@]}";do
         blk_size=`blockdev --getbsz $bd`