All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sun Ke <sunke32@huawei.com>
To: <fstests@vger.kernel.org>, <guan@eryu.me>
Cc: <sunke32@huawei.com>
Subject: [v2] generic/619: a better way to get tot_avail_size
Date: Mon, 19 Apr 2021 08:34:37 -0400	[thread overview]
Message-ID: <20210419123437.101855-1-sunke32@huawei.com> (raw)

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


                 reply	other threads:[~2021-04-19 12:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210419123437.101855-1-sunke32@huawei.com \
    --to=sunke32@huawei.com \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.