From: Dave Chinner Date: Tue, 26 Nov 2024 20:41:30 +0000 (+1100) Subject: fuzzy: don't use killall X-Git-Tag: v2024.12.08~37 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=828f70eb9be53651ae74312cdb0029ae04b38af6;p=xfstests-dev.git fuzzy: don't use killall Having test cleanup call 'killall xfs_io fsx xfs_scrub' results in a system wide process kill, rather than just the processes the test is running directly. Make sure we only kill processes the fuzz test directly owns. We can do this with 'pkill --parent $$ ' to limit the search for processes to kill to just the children of the current process. Signed-off-by: Dave Chinner Reviewed-by: Zorro lang Signed-off-by: Zorro Lang --- diff --git a/common/fuzzy b/common/fuzzy index 9181520a..3a7f04aa 100644 --- a/common/fuzzy +++ b/common/fuzzy @@ -1145,7 +1145,6 @@ __stress_scrub_fsstress_loop() { _require_xfs_stress_scrub() { _require_xfs_io_command "scrub" _require_test_program "xfsfind" - _require_command "$KILLALL_PROG" killall _require_freeze command -v _filter_scratch &>/dev/null || \ _notrun 'xfs scrub stress test requires common/filter' @@ -1178,7 +1177,9 @@ _scratch_xfs_stress_scrub_cleanup() { # distorts the golden output. echo "Killing stressor processes at $(date)" >> $seqres.full _kill_fsstress - $KILLALL_PROG -INT xfs_io fsx xfs_scrub >> $seqres.full 2>&1 + pkill -INT --parent $$ xfs_io >> $seqres.full 2>&1 + pkill -INT --parent $$ fsx >> $seqres.full 2>&1 + pkill -INT --parent $$ xfs_scrub >> $seqres.full 2>&1 # Tests are not allowed to exit with the scratch fs frozen. If we # started a fs freeze/thaw background loop, wait for that loop to exit