public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: fstests@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH 2/2] generic/235: Fix false failure on ext2
Date: Fri,  1 Nov 2019 12:00:46 +0100	[thread overview]
Message-ID: <20191101110046.24994-3-jack@suse.cz> (raw)
In-Reply-To: <20191101110046.24994-1-jack@suse.cz>

The test gives false failure on ext2 filesystem as 64k file already has
indirect block and so space usage does not exactly match expectation.
The test really needs to verify only whether quota accounting got
reenabled so just test using creating another empty file which is not
prone to these problems.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 tests/generic/235     | 5 +++--
 tests/generic/235.out | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/generic/235 b/tests/generic/235
index 6adc803c04b7..01db4711a0ec 100755
--- a/tests/generic/235
+++ b/tests/generic/235
@@ -55,8 +55,9 @@ _try_scratch_mount "-o remount,ro" 2>&1 | tee -a $seqres.full | _filter_scratch
 touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch
 _try_scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch
 
-$XFS_IO_PROG -c 'pwrite 0 64k' -c 'fsync' \
-			$SCRATCH_MNT/testfile >>$seqres.full 2>&1
+touch $SCRATCH_MNT/testfile2
+chown $qa_user:$qa_user $SCRATCH_MNT/testfile2
+
 do_repquota
 
 _scratch_unmount 2>/dev/null
diff --git a/tests/generic/235.out b/tests/generic/235.out
index abcb47a69d06..87b16e0acf6d 100644
--- a/tests/generic/235.out
+++ b/tests/generic/235.out
@@ -17,10 +17,10 @@ Block grace time: 7days; Inode grace time: 7days
                         Block limits                File limits
 User            used    soft    hard  grace    used  soft  hard  grace
 ----------------------------------------------------------------------
-fsgqa     --      64       0       0              1     0     0       
+fsgqa     --       0       0       0              2     0     0       
 *** Report for group quotas on device SCRATCH_DEV
 Block grace time: 7days; Inode grace time: 7days
                         Block limits                File limits
 Group           used    soft    hard  grace    used  soft  hard  grace
 ----------------------------------------------------------------------
-fsgqa     --      64       0       0              1     0     0       
+fsgqa     --       0       0       0              2     0     0       
-- 
2.16.4


      parent reply	other threads:[~2019-11-01 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 11:00 [PATCH 0/2] Two fixups for quota tests Jan Kara
2019-11-01 11:00 ` [PATCH 1/2] generic/382: Make test independent of fs allocation Jan Kara
2019-11-01 11:00 ` Jan Kara [this message]

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=20191101110046.24994-3-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=fstests@vger.kernel.org \
    /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