Whamcloud - gitweb
LU-3906 tests: use df instead of lfs_df in run_compilebench() 29/8429/2
authorJian Yu <jian.yu@intel.com>
Thu, 28 Nov 2013 06:47:55 +0000 (14:47 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Dec 2013 03:47:33 +0000 (03:47 +0000)
Since run_compilebench() will be run on NFS client which has no
Lustre filesystem, we need change to use df instead of lfs_df to
get the space usage information.

Test-Parameters: envdefinitions=SLOW=yes,ONLY=compilebench \
testlist=parallel-scale,parallel-scale-nfsv3,parallel-scale-nfsv4

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ia1a9586586b888231952830180157a9e37f08843
Reviewed-on: http://review.whamcloud.com/8429
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/functions.sh

index 23ff2a4..0bc4fa0 100644 (file)
@@ -296,7 +296,7 @@ run_compilebench() {
     [ -e $cbench_DIR/compilebench ] || \
         { skip_env "No compilebench build" && return; }
 
     [ -e $cbench_DIR/compilebench ] || \
         { skip_env "No compilebench build" && return; }
 
-       local space=$(lfs_df $DIR | awk '/^filesystem/{ print $4 }')
+       local space=$(df -P $DIR | tail -n 1 | awk '{ print $4 }')
        if [[ $space -le $((1024 * 1024 * cbench_IDIRS)) ]]; then
                cbench_IDIRS=$((space / 1024 / 1024))
                [[ $cbench_IDIRS -eq 0 ]] &&
        if [[ $space -le $((1024 * 1024 * cbench_IDIRS)) ]]; then
                cbench_IDIRS=$((space / 1024 / 1024))
                [[ $cbench_IDIRS -eq 0 ]] &&