diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-24 15:53:35 -0800 |
---|---|---|
committer | Eryu Guan <eguan@redhat.com> | 2018-01-25 15:56:31 +0800 |
commit | 9385d3a90113d3af6315ddf41be5f8fe6ee0fb30 (patch) | |
tree | 246603265797dbf2de303d6b065c06d068a0628c | |
parent | a6b5c98da8c4b47831752657ef010b17622c8dd7 (diff) | |
download | xfstests-dev-9385d3a90113d3af6315ddf41be5f8fe6ee0fb30.tar.gz |
generic/403: don't spew '$GETFATTR_PROG: Killed' messages
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 <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
-rwxr-xr-x | tests/generic/403 | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/generic/403 b/tests/generic/403 index 17897ffb03..31c481b4e2 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 -f $runfile wait > /dev/null 2>&1 echo Silence is golden |