* [PATCH] btrfs-progs: tests: Avoid debug log populating stdout
@ 2019-07-24 12:00 Qu Wenruo
2019-07-24 13:35 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2019-07-24 12:00 UTC (permalink / raw)
To: linux-btrfs
When running misc-test/034, we got unexpected log output:
[TEST/misc] 033-filename-length-limit
[TEST/misc] 034-metadata-uuid
Checking btrfstune logic
Checking dump-super output
Checking output after fsid change
Checking for incompat textual representation
Checking setting fsid back to original
Testing btrfs-image restore
This is caused by commit 2570cff076b1 ("btrfs-progs: test: cleanup misc-tests/034")
which uses _log facility which also populates stdout.
Just change _log() to echo "$*" >> "$RESULTS" to fix it.
Unlike the initial commit, there is no other user of _log, so it
shouldn't affect other tests.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
tests/common | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/common b/tests/common
index 79a16f1e187d..75e5540155cc 100644
--- a/tests/common
+++ b/tests/common
@@ -51,7 +51,7 @@ _fail()
# log a message to the results file
_log()
{
- echo "$*" | tee -a "$RESULTS"
+ echo "$*" >> "$RESULTS"
}
# copy stdout to log and pass to stdout, eg. another stdout consumer, commands
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: tests: Avoid debug log populating stdout
2019-07-24 12:00 [PATCH] btrfs-progs: tests: Avoid debug log populating stdout Qu Wenruo
@ 2019-07-24 13:35 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-07-24 13:35 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Wed, Jul 24, 2019 at 08:00:55PM +0800, Qu Wenruo wrote:
> When running misc-test/034, we got unexpected log output:
> [TEST/misc] 033-filename-length-limit
> [TEST/misc] 034-metadata-uuid
> Checking btrfstune logic
> Checking dump-super output
> Checking output after fsid change
> Checking for incompat textual representation
> Checking setting fsid back to original
> Testing btrfs-image restore
>
> This is caused by commit 2570cff076b1 ("btrfs-progs: test: cleanup misc-tests/034")
> which uses _log facility which also populates stdout.
>
> Just change _log() to echo "$*" >> "$RESULTS" to fix it.
> Unlike the initial commit, there is no other user of _log, so it
> shouldn't affect other tests.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Applied, thanks. I'll fix up the remaining echo > $RESULTS in tests.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-24 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24 12:00 [PATCH] btrfs-progs: tests: Avoid debug log populating stdout Qu Wenruo
2019-07-24 13:35 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox