From: Marcos Paulo de Souza <marcos@mpdesouza.com>
To: dsterba@suse.com, linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>
Subject: [PATCH] btrfs: Ignore output of "btrfs quota rescan"
Date: Fri, 10 Jul 2020 15:55:19 -0300 [thread overview]
Message-ID: <20200710185519.10322-1-marcos@mpdesouza.com> (raw)
From: Marcos Paulo de Souza <mpdesouza@suse.com>
Some recent test already ignore this output, while older ones do not.
It can sometimes make tests fail because "quota rescan" can show the
message "quota rescan started". Ignoring the output of the command
solves this problem.
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
tests/btrfs/017 | 2 +-
tests/btrfs/022 | 4 ++--
tests/btrfs/028 | 2 +-
tests/btrfs/057 | 2 +-
tests/btrfs/091 | 2 +-
tests/btrfs/104 | 2 +-
tests/btrfs/123 | 2 +-
tests/btrfs/126 | 2 +-
tests/btrfs/139 | 2 +-
tests/btrfs/153 | 2 +-
tests/btrfs/193 | 2 +-
tests/btrfs/210 | 2 +-
12 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/btrfs/017 b/tests/btrfs/017
index 1bb8295b..a888b8db 100755
--- a/tests/btrfs/017
+++ b/tests/btrfs/017
@@ -64,7 +64,7 @@ $CLONER_PROG -s 0 -d 0 -l $EXTENT_SIZE $SCRATCH_MNT/foo \
$SCRATCH_MNT/snap/foo-reflink2
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
rm -fr $SCRATCH_MNT/foo*
rm -fr $SCRATCH_MNT/snap/foo*
diff --git a/tests/btrfs/022 b/tests/btrfs/022
index aaa27aaa..442cc05c 100755
--- a/tests/btrfs/022
+++ b/tests/btrfs/022
@@ -38,7 +38,7 @@ _basic_test()
echo "=== basic test ===" >> $seqres.full
_run_btrfs_util_prog subvolume create $SCRATCH_MNT/a
_run_btrfs_util_prog quota enable $SCRATCH_MNT/a
- _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+ _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT a)
$BTRFS_UTIL_PROG qgroup show $units $SCRATCH_MNT | grep $subvolid >> \
$seqres.full 2>&1
@@ -77,7 +77,7 @@ _rescan_test()
echo "qgroup values before rescan: $output" >> $seqres.full
refer=$(echo $output | awk '{ print $2 }')
excl=$(echo $output | awk '{ print $3 }')
- _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+ _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
output=$($BTRFS_UTIL_PROG qgroup show $units $SCRATCH_MNT | grep "0/$subvolid")
echo "qgroup values after rescan: $output" >> $seqres.full
[ $refer -eq $(echo $output | awk '{ print $2 }') ] || \
diff --git a/tests/btrfs/028 b/tests/btrfs/028
index 98b9c8b9..4a574b8b 100755
--- a/tests/btrfs/028
+++ b/tests/btrfs/028
@@ -42,7 +42,7 @@ _scratch_mkfs >/dev/null
_scratch_mount
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
# Increase the probability of generating de-refer extent, and decrease
# other.
diff --git a/tests/btrfs/057 b/tests/btrfs/057
index 82e3162e..aa1d429c 100755
--- a/tests/btrfs/057
+++ b/tests/btrfs/057
@@ -47,7 +47,7 @@ run_check $FSSTRESS_PROG -d $SCRATCH_MNT/snap1 -w -p 5 -n 1000 \
$FSSTRESS_AVOID >&/dev/null
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
echo "Silence is golden"
# btrfs check will detect any qgroup number mismatch.
diff --git a/tests/btrfs/091 b/tests/btrfs/091
index 6d2a23c8..a4aeebc3 100755
--- a/tests/btrfs/091
+++ b/tests/btrfs/091
@@ -59,7 +59,7 @@ _run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv2
_run_btrfs_util_prog subvolume create $SCRATCH_MNT/subv3
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
# if we don't support noinode_cache mount option, then we should double check
# whether inode cache is enabled before executing the real test payload.
diff --git a/tests/btrfs/104 b/tests/btrfs/104
index f0cc67d6..d3338e35 100755
--- a/tests/btrfs/104
+++ b/tests/btrfs/104
@@ -113,7 +113,7 @@ _explode_fs_tree 1 $SCRATCH_MNT/snap2/files-snap2
# Enable qgroups now that we have our filesystem prepared. This
# will kick off a scan which we will have to wait for.
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
# Remount to clear cache, force everything to disk
_scratch_cycle_mount
diff --git a/tests/btrfs/123 b/tests/btrfs/123
index 65177159..63b6d428 100755
--- a/tests/btrfs/123
+++ b/tests/btrfs/123
@@ -56,7 +56,7 @@ sync
# enable quota and rescan to get correct number
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
# now balance data block groups to corrupt qgroup
_run_btrfs_balance_start -d $SCRATCH_MNT >> $seqres.full
diff --git a/tests/btrfs/126 b/tests/btrfs/126
index 8635791e..eceaabb2 100755
--- a/tests/btrfs/126
+++ b/tests/btrfs/126
@@ -41,7 +41,7 @@ _scratch_mkfs >/dev/null
_scratch_mount "-o enospc_debug"
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
_run_btrfs_util_prog qgroup limit 512K 0/5 $SCRATCH_MNT
# The amount of written data may change due to different nodesize at mkfs time,
diff --git a/tests/btrfs/139 b/tests/btrfs/139
index 1b636e81..44168e2a 100755
--- a/tests/btrfs/139
+++ b/tests/btrfs/139
@@ -43,7 +43,7 @@ SUBVOL=$SCRATCH_MNT/subvol
_run_btrfs_util_prog subvolume create $SUBVOL
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
_run_btrfs_util_prog qgroup limit -e 1G $SUBVOL
diff --git a/tests/btrfs/153 b/tests/btrfs/153
index f343da32..1f8e37e7 100755
--- a/tests/btrfs/153
+++ b/tests/btrfs/153
@@ -41,7 +41,7 @@ _scratch_mkfs >/dev/null
_scratch_mount
_run_btrfs_util_prog quota enable $SCRATCH_MNT
-_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
+_run_btrfs_util_prog quota rescan -w $SCRATCH_MNT >/dev/null
_run_btrfs_util_prog qgroup limit 100M 0/5 $SCRATCH_MNT
testfile1=$SCRATCH_MNT/testfile1
diff --git a/tests/btrfs/193 b/tests/btrfs/193
index 16b7650c..8bdc7566 100755
--- a/tests/btrfs/193
+++ b/tests/btrfs/193
@@ -43,7 +43,7 @@ _scratch_mkfs > /dev/null
_scratch_mount
$BTRFS_UTIL_PROG quota enable "$SCRATCH_MNT" > /dev/null
-$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" > /dev/null
+$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" >/dev/null
$BTRFS_UTIL_PROG qgroup limit -e 256M "$SCRATCH_MNT"
# Create a file with the following layout:
diff --git a/tests/btrfs/210 b/tests/btrfs/210
index daa76a87..a9a04951 100755
--- a/tests/btrfs/210
+++ b/tests/btrfs/210
@@ -46,7 +46,7 @@ _pwrite_byte 0xcd 0 16M "$SCRATCH_MNT/src/file" > /dev/null
# by qgroup
sync
$BTRFS_UTIL_PROG quota enable "$SCRATCH_MNT"
-$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT"
+$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" >/dev/null
$BTRFS_UTIL_PROG qgroup create 1/0 "$SCRATCH_MNT"
# Create a snapshot with qgroup inherit
--
2.26.2
next reply other threads:[~2020-07-10 19:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 18:55 Marcos Paulo de Souza [this message]
2020-07-13 8:43 ` [PATCH] btrfs: Ignore output of "btrfs quota rescan" Johannes Thumshirn
2020-07-13 10:05 ` Filipe Manana
2020-07-13 12:22 ` Marcos Paulo de Souza
2020-07-13 13:37 ` Filipe Manana
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=20200710185519.10322-1-marcos@mpdesouza.com \
--to=marcos@mpdesouza.com \
--cc=dsterba@suse.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=mpdesouza@suse.com \
/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).