Thread (11 messages) 11 messages, 2 authors, 2018-01-26
STALE3082d

[PATCH 3/5] generic/403: don't spew '$GETFATTR_PROG: Killed' messages

From: Darrick J. Wong <hidden>
Date: 2018-01-24 23:53:41
Also in: fstests
Subsystem: the rest · Maintainer: Linus Torvalds

From: Darrick J. Wong <redacted>

Use a runfile presence check to control the background getfattr loop
instead of using kill -9.  This helps us to avoid the problem that
the controlling bash will print a process killed message, which wrecks
the golden output.

Signed-off-by: Darrick J. Wong <redacted>
---
 tests/generic/403 |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/generic/403 b/tests/generic/403
index 17897ff..18fd1e5 100755
--- a/tests/generic/403
+++ b/tests/generic/403
@@ -61,7 +61,9 @@ touch $SCRATCH_MNT/file
 $SETFATTR_PROG -n trusted.small -v a $SCRATCH_MNT/file
 
 # start a background getxattr loop for the existing xattr
-while [ true ]; do
+runfile="$tmp.getfattr"
+touch $runfile
+while [ -e $runfile ]; do
 	$GETFATTR_PROG --absolute-names -n trusted.small $SCRATCH_MNT/file \
 		> /dev/null || break
 done &
@@ -75,7 +77,7 @@ for i in $(seq 0 99); do
 	$SETFATTR_PROG -x trusted.big $SCRATCH_MNT/file
 done
 
-kill -9 $getfattr_pid > /dev/null 2>&1
+rm -rf $runfile
 wait > /dev/null 2>&1
 
 echo Silence is golden
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help