common.dump: filter out latest xfsdump version messages
[xfstests-dev.git] / 127
1 #! /bin/bash
2 # FSQA Test No. 127
3 #
4 # fsx tests modified from CXFSQA tests
5 #   - fsx_00_lite
6 #   - fsx_05_lite_mmap
7 #   - fsx_10_std,
8 #   - fsx_15_std_mmap
9 #
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
12 #
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
16 #
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
25 #
26 #-----------------------------------------------------------------------
27 #
28 # creator
29 owner=allanr@sgi.com
30
31 seq=`basename $0`
32 echo "QA output created by $seq"
33
34 here=`pwd`
35 tmp=/tmp/$$
36 status=1        # failure is the default!
37 trap "_cleanup; exit \$status" 0 1 2 3 15
38
39 _cleanup()
40 {
41     rm -f $tmp.output
42     _cleanup_testdir
43 }
44
45 # get standard environment, filters and checks
46 . ./common.rc
47 . ./common.filter
48
49 FSX_FILE_SIZE=262144
50 FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -S 191110531 -N 100000"
51
52 _fsx_lite_nommap()
53 {
54     echo "=== FSX Light Mode, No Memory Mapping ==="
55     dd if=/dev/zero of=$testdir/fsx_lite_nommap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
56     if ! ltp/fsx $FSX_ARGS -L -R -W $testdir/fsx_lite_nommap > $tmp.output 2>&1
57     then
58         echo "ltp/fsx $FSX_ARGS -L -R -W $testdir/fsx_lite_nommap"
59         cat $tmp.output
60         return 1
61     fi
62     cat $tmp.output
63     return 0
64 }
65
66 _fsx_lite_mmap()
67 {
68     echo "=== FSX Light Mode, Memory Mapping ==="
69     dd if=/dev/zero of=$testdir/fsx_lite_mmap bs=${FSX_FILE_SIZE} count=1 > /dev/null 2>&1
70     if ! ltp/fsx $FSX_ARGS -L $testdir/fsx_lite_mmap > $tmp.output 2>&1
71     then
72         echo "ltp/fsx $FSX_ARGS -L fsx_lite_mmap"
73         cat $tmp.output
74         return 1
75     fi
76     cat $tmp.output
77     return 0
78 }
79
80 _fsx_std_nommap()
81 {
82     echo "=== FSX Standard Mode, No Memory Mapping ==="
83     if ! ltp/fsx $FSX_ARGS -R -W $testdir/fsx_std_nommap > $tmp.output 2>&1
84     then
85         echo "ltp/fsx $FSX_ARGS -R -W fsx_std_nommap"
86         cat $tmp.output
87         return 1
88     fi
89     cat $tmp.output
90     return 0
91 }
92
93 _fsx_std_mmap()
94 {
95     echo "=== FSX Standard Mode, Memory Mapping ==="
96     if ! ltp/fsx $FSX_ARGS $testdir/fsx_std_mmap > $tmp.output 2>&1
97     then
98         echo "ltp/fsx $FSX_ARGS fsx_std_mmap"
99         cat $tmp.output
100         return 1
101     fi
102     cat $tmp.output
103     return 0
104 }
105
106 # real QA test starts here
107 _supported_fs generic
108 _supported_os Linux
109
110 _setup_testdir
111
112 _fsx_lite_nommap
113 _fsx_lite_mmap
114
115 _fsx_std_nommap
116 _fsx_std_mmap
117
118 #flush cache after write
119 FSX_ARGS="-f $FSX_ARGS"
120 _fsx_std_nommap
121 _fsx_std_mmap
122
123
124 status=0
125 _cleanup
126 exit