xfstests: Assume yes when test device is not partitioned
[xfstests-dev.git] / run.rtio
1 #!/bin/bash
2 #
3 # Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 #
18 #
19 # (very) simple file realtime IO tests.
20 # TODO: make file size multiple of physmem.
21
22 filesize=1g
23 iosize=64k
24
25 if [ $# -gt 0 ]; then
26         printf "%s,%s,%s,%s,%s\n" type bytes ops time bytes/sec ops/sec
27         exit 0
28 fi
29
30 # buffered write
31 echo -n bwrite,
32 xfs_io iofile   -Rft    -c "pwrite -C -b $iosize 0 $filesize"
33
34 # direct write
35 echo -n dwrite,
36 xfs_io iofile   -Rftd   -c "pwrite -C -b $iosize 0 $filesize"
37
38 # buffered re-write
39 echo -n brwrite,
40 xfs_io iofile   -R      -c "pwrite -C -b $iosize 0 $filesize"
41
42 # direct re-write
43 echo -n drwrite,
44 xfs_io iofile   -Rd     -c "pwrite -C -b $iosize 0 $filesize"
45
46 # buffered read
47 echo -n bread,
48 xfs_io iofile   -R      -c "pread -C -b $iosize 0 $filesize"
49
50 # buffered re-read
51 echo -n brread,
52 xfs_io iofile   -R      -c "pread -C -b $iosize 0 $filesize"
53
54 # direct read
55 echo -n dread,
56 xfs_io iofile   -Rd     -c "pread -C -b $iosize 0 $filesize"
57
58 # direct re-read
59 echo -n drread,
60 xfs_io iofile   -Rd     -c "pread -C -b $iosize 0 $filesize"
61