diff mbox series

[2/3] generic/561: kill duperemove directly

Message ID 156588234658.24775.14952503026602339377.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: various fixes | expand

Commit Message

Darrick J. Wong Aug. 15, 2019, 3:19 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

While the kill statement added in the previous patch usually suffices to
shut down the bash loop that runs the duperemove processes, for whatever
reason this sometimes fails to kill duperemove.  Kill the duperemove
processes directly after removing the run file, which should cause the
bash loop to exit immediately.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/561 |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/generic/561 b/tests/generic/561
index 2f3eff3c..26ecff5d 100755
--- a/tests/generic/561
+++ b/tests/generic/561
@@ -47,7 +47,7 @@  function end_test()
 	# stop duperemove running
 	if [ -e $dupe_run ]; then
 		rm -f $dupe_run
-		kill -INT $dedup_pids
+		$KILLALL_PROG -q $DUPEREMOVE_PROG > /dev/null 2>&1
 		wait $dedup_pids
 	fi
 
@@ -74,7 +74,7 @@  for ((i = 0; i < $((2 * LOAD_FACTOR)); i++)); do
 	while [ -e $dupe_run ]; do
 		$DUPEREMOVE_PROG -dr --dedupe-options=same $testdir \
 			>>$seqres.full 2>&1
-	done &
+	done 2>&1 | sed -e '/Terminated/d' &
 	dedup_pids="$! $dedup_pids"
 done