]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
btrfs/028: kill lingering processes when test is interrupted
authorFilipe Manana <fdmanana@suse.com>
Thu, 28 Nov 2024 12:14:56 +0000 (12:14 +0000)
committerZorro Lang <zlang@kernel.org>
Thu, 28 Nov 2024 13:32:56 +0000 (21:32 +0800)
commit09d86a113f0a46639f3cffe98e4e9c22c085f08f
tree71fef229ebec59f3f26e843d678817c81c8f121d
parenta9c233162ef3055691ccbef685c6a245f2b9681c
btrfs/028: kill lingering processes when test is interrupted

If we interrupt the test after it spawned the fsstress and balance
processes (while it's sleeping for 30 seconds * $TIME_FACTOR), we don't
kill them and they stay around for a long time, making it impossible to
unmount the scratch filesystem (failing with -EBUSY).

Fix this by adding a _cleanup function that kills the processes and
waits for them to exit.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/028