ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mkfs: relax size check
Date: Fri, 23 Apr 2021 13:16:12 +0200	[thread overview]
Message-ID: <f224defc029816a74c518c54af2fbf2b90a90da6.1619176445.git.jstancek@redhat.com> (raw)

Number of total data blocks in filesystem reported by statfs
may be less than current formula of 90%. For example ext4 will
subtract "s_first_data_block plus internal journal blocks".

With recent change to e2fsprogs, overhead calculated in user-space
increased slightly and LTP test started failing:
  https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84

Since there's no strict rule how much the overhead will be,
as rule of thumb relax the condition to 80%.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
I haven't found better way to set the test expectation,
so to address immediate failures I propose to relax the check.

 testcases/commands/mkfs/mkfs01.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
index 13491c9685ae..3e3e56719cf3 100755
--- a/testcases/commands/mkfs/mkfs01.sh
+++ b/testcases/commands/mkfs/mkfs01.sh
@@ -69,11 +69,11 @@ mkfs_verify_size()
 	# 1k-block size should be devided by this argument for ntfs verification.
 	if [ "$1" = "ntfs" ]; then
 		local rate=1024/512
-		if [ $blocknum -lt "$(($2/$rate*9/10))" ]; then
+		if [ $blocknum -lt "$(($2/$rate*8/10))" ]; then
 			return 1
 		fi
 	else
-		if [ $blocknum -lt "$(($2*9/10))" ]; then
+		if [ $blocknum -lt "$(($2*8/10))" ]; then
 			return 1
 		fi
 	fi
-- 
2.18.1


             reply	other threads:[~2021-04-23 11:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 11:16 Jan Stancek [this message]
2021-04-23 15:06 ` [LTP] [PATCH] mkfs: relax size check Petr Vorel
2021-04-23 15:28   ` Petr Vorel
2021-04-26 13:11 ` Li Wang
2021-04-26 19:28   ` Petr Vorel
2022-11-29  3:17 zenghongling
2022-11-29 10:24 ` Petr Vorel
2022-11-30  8:06   ` Petr Vorel
2022-12-12 15:03     ` Richard Palethorpe

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=f224defc029816a74c518c54af2fbf2b90a90da6.1619176445.git.jstancek@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).