From bb2f356f14d77b5954dfbfba966bc975e26f6890 Mon Sep 17 00:00:00 2001 From: Sun Ke Date: Mon, 19 Apr 2021 08:34:37 -0400 Subject: [PATCH] generic/619: a better way to get tot_avail_size When FSTYP is tmpfs, $DF_PROG --block-size=1 $SCRATCH_DEV is not suitted. Signed-off-by: Sun Ke Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- tests/generic/619 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/generic/619 b/tests/generic/619 index 3c43fe74..460699d1 100755 --- a/tests/generic/619 +++ b/tests/generic/619 @@ -89,7 +89,7 @@ calc_thread_cnt() IFS=',' read -ra fratio <<< $file_ratio file_ratio_cnt=${#fratio[@]} - tot_avail_size=$($DF_PROG --block-size=1 $SCRATCH_DEV | awk 'FNR == 2 { print $5 }') + tot_avail_size=$($DF_PROG --block-size=1 $SCRATCH_MNT | $AWK_PROG 'FNR == 2 { print $5 }') avail_size=$(echo $tot_avail_size*$disk_saturation | $BC_PROG) thread_cnt=$(echo "$file_ratio_cnt*($avail_size/$file_ratio_unit)" | $BC_PROG) -- 2.39.5