4 # fsx exercising direct IO -- sub-block sizes and concurrent buffered IO
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of version 2 of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 # Further, this software is distributed without any warranty that it is
18 # free of the rightful claim of any third person regarding infringement
19 # or the like. Any license provided herein, whether implied or
20 # otherwise, applies only to this software file. Patent licenses, if
21 # any, provided herein do not apply to combinations of this program with
22 # other software, or any other product whatsoever.
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write the Free Software Foundation, Inc., 59
26 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
28 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
29 # Mountain View, CA 94043, or:
33 # For further information regarding this notice, see:
35 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 #-----------------------------------------------------------------------
42 echo "QA output created by $seq"
46 status=1 # failure is the default!
47 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
49 # get standard environment, filters and checks
53 # real QA test starts here
55 _supported_os Linux IRIX
57 [ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
63 echo fsx $@ | tee -a $seq.full | sed -e "s/ $bsize / BSIZE /g" -e "s/ $psize / PSIZE /g"
65 $here/ltp/fsx $@ $TEST_DIR/junk > $tmp.stdout 2> $tmp.stderr
73 psize=`$here/src/feature -p`
75 # 2.4 Linux kernels support bsize aligned direct I/O only
76 kernel=`uname -r | sed -e 's/\(2\..\).*/\1/'`
77 [ "$HOSTOS" = "Linux" -a "$kernel" = "2.4" ] && bsize=$psize
81 # -N numops: total # operations to do
82 # -l flen: the upper bound on file size
83 # -o oplen: the upper bound on operation size (64k default)
84 # -r readbdy: $psize would make reads page aligned (on i386)
85 # -t truncbdy: $psize would make truncates page aligned (on i386)
86 # -w writebdy: $psize would make writes page aligned (on i386)
88 # -Z: O_DIRECT (use -R, -W, -r and -w too)
89 # -R: mapped read operations DISabled
90 # -W: mapped write operations DISabled
92 #run_fsx -N 10000 -l 500000 -r $psize -t $psize -w $psize -Z -R -W
93 run_fsx -N 10000 -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
94 run_fsx -N 10000 -o 8192 -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
95 #run_fsx -N 10000 -o 16384 -l 500000 -r $psize -t $psize -w $psize -Z -R -W
96 run_fsx -N 10000 -o 32768 -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
97 #run_fsx -N 10000 -o 128000 -l 500000 -r $psize -t $psize -w $psize -Z -R -W
98 run_fsx -N 10000 -o 8192 -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
99 #run_fsx -N 10000 -o 16384 -l 500000 -r $psize -t $psize -w $psize -Z -R -W
100 run_fsx -N 10000 -o 32768 -l 500000 -r $psize -t $bsize -w $bsize -Z -R -W
101 #run_fsx -N 10000 -o 128000 -l 500000 -r $psize -t $psize -w $psize -Z -W
102 run_fsx -N 10000 -o 128000 -l 500000 -r $psize -t $bsize -w $bsize -Z -W
104 # Commented out calls above are less likely to pick up issues, so
105 # save time by commenting them out (leave 'em for manual testing).