Put _qmount_option into common.quota for other quota tests to use.
[xfstests-dev.git] / 133
1 #! /bin/sh
2 # FSQA Test No. 133
3 #
4 # Concurrent I/O to same file to ensure no deadlocks
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=lachlan@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1    # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     _cleanup_testdir
24 }
25
26 # get standard environment, filters and checks
27 . ./common.rc
28 . ./common.filter
29
30 # real QA test starts here
31 _supported_fs xfs
32 _supported_os Linux IRIX
33
34 _setup_testdir
35
36 echo "Buffered writer, buffered reader"
37 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
38 xfs_io -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
39 xfs_io -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
40 wait
41 rm $testdir/io_test
42
43 echo "Direct writer, buffered reader"
44 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
45 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
46 xfs_io -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
47 wait
48 rm $testdir/io_test
49
50 echo "Buffered writer, direct reader"
51 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
52 xfs_io -f -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
53 xfs_io -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
54 wait
55 rm $testdir/io_test
56
57 echo "Direct writer, direct reader"
58 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test > /dev/null
59 xfs_io -f -d -c 'pwrite -b 64k 0 512m' $testdir/io_test >/dev/null &
60 xfs_io -d -c 'pread -b 64k 0 512m' $testdir/io_test > /dev/null
61 wait
62 rm $testdir/io_test
63
64 status=0
65 exit