fix for unaligned access in loggen.c
[xfstests-dev.git] / 117
1 #! /bin/sh
2 # FS QA Test No. 117
3 #
4 # Attempt to cause filesystem corruption with serial fsstresses doing
5 # extended attributes writes - pv 940655
6 #
7 #-----------------------------------------------------------------------
8 #  Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=ajones@sgi.com
13
14 seq=`basename $0`
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1        # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 # seed for fsstress known to cause curruptions
23 seed=1122413794
24
25 ITERATIONS=10
26
27 _cleanup()
28 {
29     cd /
30     rm -f $tmp.*
31     _cleanup_testdir
32 }
33
34 # get standard environment, filters and checks
35 . ./common.rc
36 . ./common.filter
37
38 # real QA test starts here
39 _supported_fs xfs
40 _supported_os IRIX Linux
41
42 _setup_testdir
43 _require_scratch
44
45 rm -f $seq.full
46 umount $SCRATCH_DEV >/dev/null 2>&1
47 echo "*** MKFS ***"                         >>$seq.full
48 echo ""                                     >>$seq.full
49 _scratch_mkfs_xfs                           >>$seq.full 2>&1 \
50     || _fail "mkfs failed"
51 _scratch_mount                              >>$seq.full 2>&1 \
52     || _fail "mount failed"
53
54 mkdir -p $SCRATCH_MNT/fsstress
55
56 echo
57 echo Running fsstress in serial:
58 i=0
59 while [ $i -lt $ITERATIONS ]; do
60     echo fsstress iteration: $i | tee -a $seq.full
61     $FSSTRESS_PROG \
62         -d $SCRATCH_MNT/fsstress \
63         -f allocsp=0 \
64         -f freesp=0 \
65         -f bulkstat=0 \
66         -f bulkstat1=0 \
67         -f resvsp=0 \
68         -f unresvsp=0 \
69         -f attr_set=100 \
70         -f attr_remove=100 \
71         -s $seed \
72         -S -p 1 -n 1000 >>$seq.full 2>&1
73
74     i=`expr $i + 1`
75 done
76
77 cd /
78 umount $SCRATCH_MNT
79 echo 
80 echo Checking filesystem
81 _check_scratch_fs
82 _scratch_mount
83
84 status=$?
85 exit