fix group listing regexp
[xfstests-dev.git] / 083
1 #! /bin/sh
2 # FS QA Test No. 083
3 #
4 # Exercise filesystem full behaviour - run numerous fsstress
5 # processes in write mode on a small filesystem.  NB: delayed
6 # allocate flushing is quite deadlock prone at the filesystem
7 # full boundary due to the fact that we will retry allocation
8 # several times after flushing, before giving back ENOSPC.
9 #
10 # Note that this test will intentionally cause console msgs of form:
11 #     dksc0d1s4: Process [fsstress] ran out of disk space
12 #     dksc0d1s4: Process [fsstress] ran out of disk space
13 #     dksc0d1s4: Process [fsstress] ran out of disk space
14 #
15
16 #-----------------------------------------------------------------------
17 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
18 #-----------------------------------------------------------------------
19 #
20 # creator
21 owner=nathans@sgi.com
22
23 seq=`basename $0`
24 echo "QA output created by $seq"
25
26 here=`pwd`
27 tmp=/tmp/$$
28 status=1
29
30 _cleanup()
31 {
32         echo "*** unmount"
33         umount $SCRATCH_MNT 2>/dev/null
34         rm -f $tmp.*
35 }
36 trap "_cleanup; exit \$status" 0 1 2 3 15
37
38 # get standard environment, filters and checks
39 . ./common.rc
40 . ./common.filter
41
42 # real QA test starts here
43 _supported_fs xfs
44 _supported_os IRIX Linux
45
46 _require_scratch
47 _require_nobigloopfs
48
49 rm -f $seq.full
50
51 workout()
52 {
53         fsz=$1
54         ags=$2
55         procs=$3
56         nops=$4
57
58         umount $SCRATCH_DEV >/dev/null 2>&1
59         echo "*** mkfs -dsize=$fsz,agcount=$ags"    >>$seq.full
60         echo ""                                     >>$seq.full
61         _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags  >>$seq.full 2>&1 \
62                 || _fail "size=$fsz,agcount=$ags mkfs failed"
63         _scratch_mount                              >>$seq.full 2>&1 \
64                 || _fail "mount failed"
65
66         # -w ensures that the only ops are ones which cause write I/O
67         $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
68                 >>$seq.full
69         _check_scratch_fs
70 }
71
72 echo "*** test out-of-space handling for random write operations"
73
74 filesize=100m
75 agcount=6
76 numprocs=15
77 numops=1500
78
79 workout $filesize $agcount $numprocs $numops
80
81 echo "*** done"
82 status=0
83 exit