3 #-----------------------------------------------------------------------
4 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #-----------------------------------------------------------------------
23 # Test preallocated_rw_pattern_test modified from CXFSQA test preallocated_rw_pattern_test
25 # pat stands for pattern. First 8 bytes contains the 64-bit number 0,
26 # second is 1, ..., until last 8 bytes (1048568-1048575) contain 131071.
27 # patw preallocates the file and then writes the pattern, patr checks it
33 echo "QA output created by $seq"
37 status=1 # failure is the default!
38 trap "_cleanup; exit \$status" 0 1 2 3 15
46 # get standard environment, filters and checks
50 # real QA test starts here
51 _supported_fs xfs udf nfs
56 _scratch_mkfs >/dev/null 2>&1
59 # Run preallo_rw_pattern on both test and scratch partitions
60 for TESTFILE in $testdir/rw_pattern.tmp $SCRATCH_MNT/rw_pattern.tmp
63 while (( count < 101 ))
65 src/preallo_rw_pattern_writer $TESTFILE
66 src/preallo_rw_pattern_reader $TESTFILE
67 if (test $? -ne 0) then
68 echo Read/Write Pattern Test FAILED.
74 done #done for count of 100
77 if (test $? -eq 0 ) then