From: Filipe Manana Date: Wed, 27 Mar 2024 17:11:36 +0000 (+0000) Subject: btrfs/028: use the helper _btrfs_kill_stress_balance_pid X-Git-Tag: v2024.04.14~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1237986570e10aa8fc8b70fcc013a834192a16ea;p=xfstests-dev.git btrfs/028: use the helper _btrfs_kill_stress_balance_pid Now that there's a helper to kill a background process that is running _btrfs_stress_balance(), use it in btrfs/028. It's equivalent to the existing code in btrfs/028. Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Signed-off-by: Anand Jain --- diff --git a/tests/btrfs/028 b/tests/btrfs/028 index d860974e..8fbe8887 100755 --- a/tests/btrfs/028 +++ b/tests/btrfs/028 @@ -44,12 +44,9 @@ balance_pid=$! # 30s is enough to trigger bug sleep $((30*$TIME_FACTOR)) -kill $fsstress_pid $balance_pid &> /dev/null -wait - -# kill _btrfs_stress_balance can't end balance, so call btrfs balance cancel -# to cancel running or paused balance. -$BTRFS_UTIL_PROG balance cancel $SCRATCH_MNT &> /dev/null +kill $fsstress_pid &> /dev/null +wait $fsstress_pid &> /dev/null +_btrfs_kill_stress_balance_pid $balance_pid _run_btrfs_util_prog filesystem sync $SCRATCH_MNT