btrfs-progs: tests: do not log output of run_mayfail to terminal

No need to log expected failures to the terminal, the results file is
fine; pass the return value of the command.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2015-10-26 19:51:10 +01:00
parent a73eb8b993
commit 425274ed8f

View file

@ -51,9 +51,13 @@ run_mayfail()
echo "############### $@" >> $RESULTS 2>&1
if [ "$TEST_LOG" = 'tty' ]; then echo "CMD(mayfail): $@" > /dev/tty; fi
if [ "$1" = 'root_helper' ]; then
"$@" >> $RESULTS 2>&1 || _log "failed (ignored): $@"
"$@" >> $RESULTS 2>&1
else
$INSTRUMENT "$@" >> $RESULTS 2>&1 || _log "failed (ignored): $@"
$INSTRUMENT "$@" >> $RESULTS 2>&1
fi
if [ $? != 0 ]; then
echo "failed (ignored): $@" >> $RESULTS
return 1
fi
}