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 2570cff076 ("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>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Qu Wenruo 2019-07-24 20:00:55 +08:00 committed by David Sterba
parent 4a714918f0
commit 6f24e7276b
1 changed files with 1 additions and 1 deletions

View File

@ -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