public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH] fstests: btrfs/021: redirect the output of defrag command
Date: Sun, 13 Nov 2022 10:08:41 +0800	[thread overview]
Message-ID: <20221113020841.40180-1-wqu@suse.com> (raw)

[BUG]
Test case btrfs/021 will fail with v6.0 btrfs-progs, with the extra
output:

     QA output created by 021
    +/mnt/scratch/padding-0
    +/mnt/scratch/padding-1
    +/mnt/scratch/padding-2
    +/mnt/scratch/padding-3
    +/mnt/scratch/padding-4
    +/mnt/scratch/padding-5
    ...

[CAUSE]
In fact this is a btrfs-progs bug, btrfs-progs commit db2f85c8751c
("btrfs-progs: fi defrag: add global verbose option") changed the output
level of defrag command.

[FIX]
This will be fixed in btrfs-progs, while as a workaround we can redirect
the stdout into $seqres.full.

If we hit some error, the stderr will still pollute the golden output
and be caught by the test case.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/btrfs/021 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/btrfs/021 b/tests/btrfs/021
index 5943da2f..6b6383cb 100755
--- a/tests/btrfs/021
+++ b/tests/btrfs/021
@@ -23,7 +23,7 @@ run_test()
 	sleep 0.5
 
 	find $SCRATCH_MNT -type f -print0 | xargs -0 \
-	$BTRFS_UTIL_PROG filesystem defrag -f
+	$BTRFS_UTIL_PROG filesystem defrag -f >> $seqres.full
 
 	sync
 	wait
-- 
2.38.0


             reply	other threads:[~2022-11-13  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13  2:08 Qu Wenruo [this message]
2022-11-14 10:33 ` [PATCH] fstests: btrfs/021: redirect the output of defrag command 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=20221113020841.40180-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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