FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [v2] generic/619: a better way to get tot_avail_size
@ 2021-04-19 12:34 Sun Ke
  0 siblings, 0 replies; only message in thread
From: Sun Ke @ 2021-04-19 12:34 UTC (permalink / raw)
  To: fstests, guan; +Cc: sunke32

When FSTYP is tmpfs, $DF_PROG --block-size=1 $SCRATCH_DEV is not suitted.

Signei-off-by: Sun Ke <sunke32@huawei.com>
---
 tests/generic/619 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/619 b/tests/generic/619
index 3c43fe746917..460699d1bdf0 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.25.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 12:34 [v2] generic/619: a better way to get tot_avail_size Sun Ke

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git