All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/019: kill background processes on interrupt
@ 2022-04-11  5:48 Dave Chinner
  2022-04-12 12:59 ` David Disseldorp
  0 siblings, 1 reply; 14+ messages in thread
From: Dave Chinner @ 2022-04-11  5:48 UTC (permalink / raw)
  To: fstests

From: Dave Chinner <dchinner@redhat.com>

If you ctrl-c generic/019, it leaves fsstress processes running.
Kill them in the cleanup function so that they don't have to be
manually killed after interrupting the test.

While touching the _cleanup() function, make it do everything that
the generic _cleanup function it overrides does and fix the
indenting.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 tests/generic/019 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/generic/019 b/tests/generic/019
index db56dac1..cda107f4 100755
--- a/tests/generic/019
+++ b/tests/generic/019
@@ -53,8 +53,10 @@ stop_fail_scratch_dev()
 # Override the default cleanup function.
 _cleanup()
 {
-    disallow_fail_make_request
-    rm -f $tmp.*
+	kill $fs_pid $fio_pid &> /dev/null
+	disallow_fail_make_request
+	cd /
+	rm -r -f $tmp.*
 }
 
 RUN_TIME=$((20+10*$TIME_FACTOR))
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-04-18 18:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  5:48 [PATCH] generic/019: kill background processes on interrupt Dave Chinner
2022-04-12 12:59 ` David Disseldorp
2022-04-12 14:25   ` Zorro Lang
2022-04-13  0:26     ` Dave Chinner
2022-04-13  7:13       ` Amir Goldstein
2022-04-13 23:27         ` Darrick J. Wong
2022-04-18  0:02         ` Dave Chinner
2022-04-14 16:25       ` Zorro Lang
2022-04-14 19:16         ` Zorro Lang
2022-04-16  9:20           ` Amir Goldstein
2022-04-16 14:11             ` Zorro Lang
2022-04-16 17:13               ` Amir Goldstein
2022-04-18 17:07                 ` Darrick J. Wong
2022-04-18 18:08                   ` Zorro Lang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.