btrfs: stop using run_check in _run_btrfs_balance_start

The use of run_check() immediately stops a test because it calls the
_fail() function when execution of its argument fails. This is
generally not encouraged in fstests as it prevents a test from
detecting further problems after that failure.

Since the next patch in this series updates other tests to use
_run_btrfs_balance_start() for which a failure to run balance can be
expected (btrfs/187 for example), remove the use of run_check() from
_run_btrfs_balance_start(). Existing tests that use
_run_btrfs_balance_start() now redirect standard output to the
test's .full file for debugging purposes. In case balance fails the
tests will fail due to unexpected output from the standard error.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Filipe Manana
2020-04-14 17:22:32 +01:00
committed by Eryu Guan
parent ab3b7f026e
commit af3d0c0ea9
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -382,7 +382,7 @@ _run_btrfs_balance_start()
$BTRFS_UTIL_PROG balance start --help | grep -q "full-balance"
(( $? == 0 )) && bal_opt="--full-balance"
run_check $BTRFS_UTIL_PROG balance start $bal_opt $*
$BTRFS_UTIL_PROG balance start $bal_opt $*
}
#return the sector size of the btrfs scratch fs