From: Sun Ke Date: Mon, 19 Apr 2021 12:34:37 +0000 (-0400) Subject: generic/619: a better way to get tot_avail_size X-Git-Tag: v2022.05.01~453 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=bb2f356f14d77b5954dfbfba966bc975e26f6890 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 --- 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)