#
# Mmap and interrupts
#
TEST=`basename $0`

cat << EOF
${TEST}:	If one of the following tests terminates with SIGBUS
	(signal 7), then you either have your NFS file system
	mounted with "-o intr", or your NFS client doesn't
	block all signals properly during read/write operations.
EOF

MNT=`df . | tail -1 | awk '{ print $5 }'`
case `mount | grep " $MNT "` in
*,intr*|intr*)
	cat << EOF

	It seems your NFS volume $MNT was mounted
	with -o intr. Expect the following tests to fail.

EOF
	: ;;
esac

interrupt -n -s TERM -t 30 -m "${TEST}a (interrupt mmap)" \
	-- mmapper -Rvtsii -a 10 -r -1 -l 8m -f testfile

interrupt -n -s TERM -t 30 -m "${TEST}b (interrupt mmap)" \
	-- mmapper -Rvtsii -a  1 -r -1 -l 8m -f testfile

rm -f testfile
