xref: /aosp_15_r20/external/ltp/testcases/kernel/fs/doio/README (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker
2*49cdfc7eSAndroid Build Coastguard Worker$Id: README,v 1.1 2001/08/27 22:15:12 plars Exp $
3*49cdfc7eSAndroid Build Coastguard Worker
4*49cdfc7eSAndroid Build Coastguard WorkerThis file contains some very basic information on:
5*49cdfc7eSAndroid Build Coastguard Worker   iogen/doio and rwtest
6*49cdfc7eSAndroid Build Coastguard Worker   growfiles
7*49cdfc7eSAndroid Build Coastguard Worker
8*49cdfc7eSAndroid Build Coastguard WorkerAll tools use the -h flag for printing some form of help (sometimes voluminous).
9*49cdfc7eSAndroid Build Coastguard WorkerThey are extremely configurable; the examples below are some common uses.
10*49cdfc7eSAndroid Build Coastguard WorkerRead the help and experiment!   This testing tools were originally written
11*49cdfc7eSAndroid Build Coastguard Workerto test UNICOS's NC1 and IRIX XFS filesystems.
12*49cdfc7eSAndroid Build Coastguard Worker
13*49cdfc7eSAndroid Build Coastguard Worker
14*49cdfc7eSAndroid Build Coastguard WorkerIOGEN & DOIO
15*49cdfc7eSAndroid Build Coastguard Worker=============
16*49cdfc7eSAndroid Build Coastguard Worker
17*49cdfc7eSAndroid Build Coastguard WorkerThis is a pair of programs that does basic I/O operations on a set of files.
18*49cdfc7eSAndroid Build Coastguard WorkerThe file offset, I/O length, I/O operation, and what open(2) flags are
19*49cdfc7eSAndroid Build Coastguard Workerselected randomly from a pre-defined or commandline given set. All data
20*49cdfc7eSAndroid Build Coastguard Workerwritten can be verified (this is the usual method).
21*49cdfc7eSAndroid Build Coastguard Worker
22*49cdfc7eSAndroid Build Coastguard Workerrwtest is a shell script that is a wrapper of iogen and doio.
23*49cdfc7eSAndroid Build Coastguard Worker
24*49cdfc7eSAndroid Build Coastguard WorkerExamples:
25*49cdfc7eSAndroid Build Coastguard Worker---------
26*49cdfc7eSAndroid Build Coastguard Worker# run forever:  8 process - using record locks
27*49cdfc7eSAndroid Build Coastguard Workeriogen -i 0 100000b:doio_1 | doio -av -n 8 -m 1000
28*49cdfc7eSAndroid Build Coastguard Worker
29*49cdfc7eSAndroid Build Coastguard Worker# run forever:  8 process - using record locks
30*49cdfc7eSAndroid Build Coastguard Workeriogen -i 0 100000b:doio_2 | doio -akv -n 8 -m 1000
31*49cdfc7eSAndroid Build Coastguard Worker
32*49cdfc7eSAndroid Build Coastguard Worker# run forever: max i/o 64b, to /tmp/rwtest01%f, which 500b in size
33*49cdfc7eSAndroid Build Coastguard Workerrwtest -c -i 0 -T 64b 500b:/tmp/rwtest01%f
34*49cdfc7eSAndroid Build Coastguard Worker
35*49cdfc7eSAndroid Build Coastguard Worker
36*49cdfc7eSAndroid Build Coastguard Worker
37*49cdfc7eSAndroid Build Coastguard WorkerGROWFILES
38*49cdfc7eSAndroid Build Coastguard Worker=============
39*49cdfc7eSAndroid Build Coastguard Worker
40*49cdfc7eSAndroid Build Coastguard WorkerGrowfiles will create and truncate files in gradual steps using write, and
41*49cdfc7eSAndroid Build Coastguard Workerlseek. All system calls are checked for proper returns. The writes or the
42*49cdfc7eSAndroid Build Coastguard Workerwhole file content can be verified.  It can cause disk fragmentation.
43*49cdfc7eSAndroid Build Coastguard Worker
44*49cdfc7eSAndroid Build Coastguard Worker
45*49cdfc7eSAndroid Build Coastguard WorkerExamples:
46*49cdfc7eSAndroid Build Coastguard Worker---------
47*49cdfc7eSAndroid Build Coastguard Workergrowfiles -E output:
48*49cdfc7eSAndroid Build Coastguard Worker# run forever: writes of 4090 bytes then on every 100 iterval
49*49cdfc7eSAndroid Build Coastguard Worker# truncate file by 408990 bytes.  Done to 200 files in dir1.
50*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i 0 -g 4090 -T 100 -t 408990 -l -C 10 -c 1000 -d dir1 -S 200
51*49cdfc7eSAndroid Build Coastguard Worker
52*49cdfc7eSAndroid Build Coastguard Worker# same as above with writes of 5000 bytes and truncs of 499990
53*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i 0 -g 5000 -T 100 -t 499990 -l -C 10 -c 1000 -d dir2 -S 200
54*49cdfc7eSAndroid Build Coastguard Worker
55*49cdfc7eSAndroid Build Coastguard Worker# runs forever: beats on opens and closes of file ocfile - no io
56*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i 0 -g 0 -c 0 -C 0 ocfile
57*49cdfc7eSAndroid Build Coastguard Worker
58*49cdfc7eSAndroid Build Coastguard Worker# writes 4096 to files until 50 blocks are written
59*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i 0 -g 4096 -B 50b file1 file2
60*49cdfc7eSAndroid Build Coastguard Worker
61*49cdfc7eSAndroid Build Coastguard Worker# write one byte to 750 files in gdir then unlinks them
62*49cdfc7eSAndroid Build Coastguard Workergrowfiles -g 1 -C 0 -d gdir -u -S 750
63*49cdfc7eSAndroid Build Coastguard Worker
64*49cdfc7eSAndroid Build Coastguard Worker# run 30 secs: random iosize, random lseek up to eof
65*49cdfc7eSAndroid Build Coastguard Worker# Only valid for one growfile process per file.
66*49cdfc7eSAndroid Build Coastguard Workergrowfiles -r 1-5000 -R 0--1 -i 0 -L 30 -C 1 g_rand1 g_rand2
67*49cdfc7eSAndroid Build Coastguard Worker
68*49cdfc7eSAndroid Build Coastguard Worker# run 30 secs: grow by lseek then write single byte, trunc every 10 itervals
69*49cdfc7eSAndroid Build Coastguard Workergrowfiles -g 5000 -wlu -i 0 -L 30 -C 1 -T 10  g_sleek1 g_lseek2
70*49cdfc7eSAndroid Build Coastguard Worker
71*49cdfc7eSAndroid Build Coastguard Worker# run forever: 5 copies of random iosize, random lseek to beyond eof,
72*49cdfc7eSAndroid Build Coastguard Worker# rand io types doing a trunc every 5 iterations, with unlinks.
73*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i0 -r 1-50000 -R 0--2 -I r -C1 -l -n5 -u -U 100-200 gf_rana gf_ranb
74*49cdfc7eSAndroid Build Coastguard Worker
75*49cdfc7eSAndroid Build Coastguard Worker# run forever: 5 copies of random iosize, random lseek to beyond eof,
76*49cdfc7eSAndroid Build Coastguard Worker# random open flags, rand io types doing a trunc every 10 iterations.
77*49cdfc7eSAndroid Build Coastguard Workergrowfiles -i0 -r 1-50000 -R 0--2 -o random -I r -C0 -l -T 20 -uU100-200 -n 5 gf_rand1 gf_rand2
78*49cdfc7eSAndroid Build Coastguard Worker
79*49cdfc7eSAndroid Build Coastguard Worker
80