From 6f24e7276b827410e5a3e41ba2366bbbe8f41b68 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 24 Jul 2019 20:00:55 +0800 Subject: [PATCH] btrfs-progs: tests: Avoid debug log populating stdout 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 Signed-off-by: David Sterba --- tests/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common b/tests/common index 79a16f1e..75e55401 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