Stop creating shit files.
[xfstests-dev.git] / 167
1 #! /bin/sh
2 # FSQA Test No. 167
3 #
4 # unwritten extent conversion test
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=dgc@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 rm -f $seq.full
19 status=1    # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 _cleanup()
23 {
24         killall -r -q -TERM fsstress 2> /dev/null
25         sync    # ensures all fsstress processes died
26         _cleanup_testdir
27 }
28
29 workout()
30 {
31         procs=100
32         nops=15000
33         $FSSTRESS_PROG -d $SCRATCH_MNT -p $procs -n $nops $FSSTRESS_AVOID \
34                 >>$seq.full &
35         sleep 2
36 }
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 Linux
45
46 _setup_testdir
47 _require_scratch
48 _scratch_mkfs_xfs >/dev/null 2>&1
49 _scratch_mount
50
51 TEST_FILE=$SCRATCH_MNT/test_file
52 TEST_PROG=$here/src/unwritten_sync
53 LOOPS=50
54
55 echo "*** test unwritten extent conversion under heavy I/O"
56
57 workout
58
59 rm -f $TEST_FILE
60 $TEST_PROG $LOOPS $TEST_FILE
61
62 echo "     *** test done"
63
64 status=0
65 exit