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>
$SETFATTR_PROG -n trusted.small -v a $SCRATCH_MNT/file
# start a background getxattr loop for the existing xattr
$SETFATTR_PROG -n trusted.small -v a $SCRATCH_MNT/file
# start a background getxattr loop for the existing xattr
+runfile="$tmp.getfattr"
+touch $runfile
+while [ -e $runfile ]; do
$GETFATTR_PROG --absolute-names -n trusted.small $SCRATCH_MNT/file \
> /dev/null || break
done &
$GETFATTR_PROG --absolute-names -n trusted.small $SCRATCH_MNT/file \
> /dev/null || break
done &
$SETFATTR_PROG -x trusted.big $SCRATCH_MNT/file
done
$SETFATTR_PROG -x trusted.big $SCRATCH_MNT/file
done
-kill -9 $getfattr_pid > /dev/null 2>&1
wait > /dev/null 2>&1
echo Silence is golden
wait > /dev/null 2>&1
echo Silence is golden