aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYilong Ren <yilongx.ren@intel.com>2016-03-02 14:20:47 +0800
committerAndi Kleen <ak@linux.intel.com>2016-04-11 15:32:38 -0700
commit3b9e5ace6452af34cc0881908ef7d7f44cb9f35e (patch)
treed2db91803027f9dec642fd15b8af9f1ae2dedb03
parentf3df4b7daec9c8535b6407e1328572fd0af3022b (diff)
downloadmce-test-3b9e5ace6452af34cc0881908ef7d7f44cb9f35e.tar.gz
Minor bug fix about fs-metadata.sh
Current codes in fs-metadata.sh exist two problems: * when using "-d" option to specify the test disk, test disk will be mounted in $K_CWD/../hwpoison but not in $K_CWD. * test disk free space calculation is wrong "local free_space=$( df . -m | awk '{ print $3}' | tail -1)" the variable "free_space" points to "Used", but not *free space*. comments are rewritten by Gong. Signed-off-by: Yilong Ren <yilongx.ren@intel.com> Signed-off-by: Chen, Gong <gong.chen@linux.intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rwxr-xr-xcases/stress/hwpoison/tools/fs-metadata/fs-metadata.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/cases/stress/hwpoison/tools/fs-metadata/fs-metadata.sh b/cases/stress/hwpoison/tools/fs-metadata/fs-metadata.sh
index 707e4a8..115d26b 100755
--- a/cases/stress/hwpoison/tools/fs-metadata/fs-metadata.sh
+++ b/cases/stress/hwpoison/tools/fs-metadata/fs-metadata.sh
@@ -116,13 +116,13 @@ function k_result()
function check_disk_space()
{
- run_quiet cd $K_CWD
+ run_quiet cd $K_CWD/../hwpoison
local depth=$(expr $1 + 1)
local width=$2
local thread=$3
local tree_size=$(echo "scale=2; (1-$width^$depth)/(1-$width) *2*4/1024 " | bc)
local total_size=$(echo "scale=2; $tree_size * 2 * $thread " | bc)
- local free_space=$( df . -m | awk '{ print $3}' | tail -1)
+ local free_space=$( df . -m | awk '{ print $4}' | tail -1)
k_log "The k-tree size is $tree_size M, the total free space reqirements is about $total_size M."