xref: /aosp_15_r20/external/ltp/testscripts/ltp-aiodio.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker#!/bin/bash
2*49cdfc7eSAndroid Build Coastguard Worker# This script should be run after installing the libaio RPM or libraries
3*49cdfc7eSAndroid Build Coastguard Worker# A valid large file should be passed to the test.
4*49cdfc7eSAndroid Build Coastguard Worker# These tests will only run correctly if the kernel and libaio has been compiled
5*49cdfc7eSAndroid Build Coastguard Worker# with at least a 3.3.X GCC. Older versions of the compiler will seg fault.
6*49cdfc7eSAndroid Build Coastguard Worker#
7*49cdfc7eSAndroid Build Coastguard Worker# 02/08/04 [email protected]
8*49cdfc7eSAndroid Build Coastguard Worker#
9*49cdfc7eSAndroid Build Coastguard Worker# 04/12/06 a Forth scenerio file has been added ltp-aiodio.part4
10*49cdfc7eSAndroid Build Coastguard Worker#
11*49cdfc7eSAndroid Build Coastguard Worker
12*49cdfc7eSAndroid Build Coastguard Workercd `dirname $0`
13*49cdfc7eSAndroid Build Coastguard Workerexport LTPROOT=${PWD}
14*49cdfc7eSAndroid Build Coastguard Workerecho $LTPROOT | grep testscripts > /dev/null 2>&1
15*49cdfc7eSAndroid Build Coastguard Workerif [ $? -eq 0 ]; then
16*49cdfc7eSAndroid Build Coastguard Worker cd ..
17*49cdfc7eSAndroid Build Coastguard Worker export LTPROOT=${PWD}
18*49cdfc7eSAndroid Build Coastguard Workerfi
19*49cdfc7eSAndroid Build Coastguard Workerexport PATH=$LTPROOT/testcases/bin:$PATH
20*49cdfc7eSAndroid Build Coastguard Workerexport TMP=${TMP:=/tmp}
21*49cdfc7eSAndroid Build Coastguard Worker
22*49cdfc7eSAndroid Build Coastguard Workerrun0=0
23*49cdfc7eSAndroid Build Coastguard WorkerrunTest=0
24*49cdfc7eSAndroid Build Coastguard WorkernextTest=0
25*49cdfc7eSAndroid Build Coastguard WorkerrunExtendedStress=0
26*49cdfc7eSAndroid Build Coastguard Worker
27*49cdfc7eSAndroid Build Coastguard Workerexport TMPBASE="/tmp"
28*49cdfc7eSAndroid Build Coastguard Workerusage()
29*49cdfc7eSAndroid Build Coastguard Worker{
30*49cdfc7eSAndroid Build Coastguard Worker	cat <<-END >&2
31*49cdfc7eSAndroid Build Coastguard Worker	usage: ${0##*/} [ -f large_filename -b partition] [-o optional partition] [-e 1] [-t 1] [-j 1] [-x 1] or [-a 1]
32*49cdfc7eSAndroid Build Coastguard Worker
33*49cdfc7eSAndroid Build Coastguard Worker	defaults:
34*49cdfc7eSAndroid Build Coastguard Worker	file1=$file1
35*49cdfc7eSAndroid Build Coastguard Worker	part1=$part1
36*49cdfc7eSAndroid Build Coastguard Worker        ext2=0
37*49cdfc7eSAndroid Build Coastguard Worker        ext3=0
38*49cdfc7eSAndroid Build Coastguard Worker        jfs=0
39*49cdfc7eSAndroid Build Coastguard Worker        xfs=0
40*49cdfc7eSAndroid Build Coastguard Worker      example: ${0##*/} -f MyLargeFile -b /dev/hdc1 [-o /dev/hdc2] [-a 1] or
41*49cdfc7eSAndroid Build Coastguard Worker[-e 1] [-x 1] [-j 1] [-t 1]
42*49cdfc7eSAndroid Build Coastguard Worker        -o = optional partition allows some of the tests to utilize multiple filesystems to further stress AIO/DIO
43*49cdfc7eSAndroid Build Coastguard Worker        -e = test ex2 filesystem.
44*49cdfc7eSAndroid Build Coastguard Worker        -t = test ext3 filesystem
45*49cdfc7eSAndroid Build Coastguard Worker        -j = test JFS filesystem
46*49cdfc7eSAndroid Build Coastguard Worker        -x = test XFS filesystem
47*49cdfc7eSAndroid Build Coastguard Worker                    or
48*49cdfc7eSAndroid Build Coastguard Worker        -a = test all supported filesystems, this will override any other filesystem flags passed.
49*49cdfc7eSAndroid Build Coastguard Worker
50*49cdfc7eSAndroid Build Coastguard Worker        - a 1 turns on the test for the above supported filesystem, just omit passing the flag to skip that filesystem.
51*49cdfc7eSAndroid Build Coastguard Worker
52*49cdfc7eSAndroid Build Coastguard Worker        - A Large file should be passed to fully stress the test. You must pass at least one filesystem to test, you can pass any combination
53*49cdfc7eSAndroid Build Coastguard Worker          but there is not a default filesystem. ReiserFS does not support AIO so these tests will not support ReiserFS.
54*49cdfc7eSAndroid Build Coastguard Worker
55*49cdfc7eSAndroid Build Coastguard Worker        - WARNING !! The partition you pass will be overwritten. This is a destructive test so only pass a partition where data can be destroyed.
56*49cdfc7eSAndroid Build Coastguard Worker
57*49cdfc7eSAndroid Build Coastguard Worker
58*49cdfc7eSAndroid Build Coastguard Worker
59*49cdfc7eSAndroid Build Coastguard Worker	END
60*49cdfc7eSAndroid Build Coastguard Workerexit
61*49cdfc7eSAndroid Build Coastguard Worker}
62*49cdfc7eSAndroid Build Coastguard Worker
63*49cdfc7eSAndroid Build Coastguard Workerwhile getopts :a:b:e:f:t:o:x:j: arg
64*49cdfc7eSAndroid Build Coastguard Workerdo      case $arg in
65*49cdfc7eSAndroid Build Coastguard Worker		f)	file1=$OPTARG;;
66*49cdfc7eSAndroid Build Coastguard Worker		b)	part1=$OPTARG;;
67*49cdfc7eSAndroid Build Coastguard Worker		o)	part2=$OPTARG;;
68*49cdfc7eSAndroid Build Coastguard Worker		e)	ext2=$OPTARG;;
69*49cdfc7eSAndroid Build Coastguard Worker		t)	ext3=$OPTARG;;
70*49cdfc7eSAndroid Build Coastguard Worker		x)	xfs=$OPTARG;;
71*49cdfc7eSAndroid Build Coastguard Worker		j)	jfs=$OPTARG;;
72*49cdfc7eSAndroid Build Coastguard Worker		a)	allfs=$OPTARG;;
73*49cdfc7eSAndroid Build Coastguard Worker
74*49cdfc7eSAndroid Build Coastguard Worker                \?)     echo "************** Help Info: ********************"
75*49cdfc7eSAndroid Build Coastguard Worker                        usage;;
76*49cdfc7eSAndroid Build Coastguard Worker        esac
77*49cdfc7eSAndroid Build Coastguard Workerdone
78*49cdfc7eSAndroid Build Coastguard Worker
79*49cdfc7eSAndroid Build Coastguard Workerif [ ! -n "$file1"  ]; then
80*49cdfc7eSAndroid Build Coastguard Worker  echo "Missing the large file. You must pass a large filename for testing"
81*49cdfc7eSAndroid Build Coastguard Worker  usage;
82*49cdfc7eSAndroid Build Coastguard Worker  exit
83*49cdfc7eSAndroid Build Coastguard Workerfi
84*49cdfc7eSAndroid Build Coastguard Worker
85*49cdfc7eSAndroid Build Coastguard Workerif [ ! -n "$part1"  ]; then
86*49cdfc7eSAndroid Build Coastguard Worker  echo "Missing the partition. You must pass a partition for testing"
87*49cdfc7eSAndroid Build Coastguard Worker  usage;
88*49cdfc7eSAndroid Build Coastguard Worker  exit
89*49cdfc7eSAndroid Build Coastguard Workerfi
90*49cdfc7eSAndroid Build Coastguard Worker
91*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$allfs"  ]; then
92*49cdfc7eSAndroid Build Coastguard Worker  echo "testing ALL supported filesystems"
93*49cdfc7eSAndroid Build Coastguard Worker  ext2="1"
94*49cdfc7eSAndroid Build Coastguard Worker  ext3="1"
95*49cdfc7eSAndroid Build Coastguard Worker  jfs="1"
96*49cdfc7eSAndroid Build Coastguard Worker  xfs="1"
97*49cdfc7eSAndroid Build Coastguard Worker  echo "test run = $run0"
98*49cdfc7eSAndroid Build Coastguard Workerfi
99*49cdfc7eSAndroid Build Coastguard Worker
100*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$ext2"  ]; then
101*49cdfc7eSAndroid Build Coastguard Worker  echo "** testing ext2 **"
102*49cdfc7eSAndroid Build Coastguard Worker  run0=$(($run0+1))
103*49cdfc7eSAndroid Build Coastguard Workerfi
104*49cdfc7eSAndroid Build Coastguard Worker
105*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$ext3"  ]; then
106*49cdfc7eSAndroid Build Coastguard Worker  echo "** testing ext3 **"
107*49cdfc7eSAndroid Build Coastguard Worker  run0=$(($run0+1))
108*49cdfc7eSAndroid Build Coastguard Workerfi
109*49cdfc7eSAndroid Build Coastguard Worker
110*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$xfs"  ]; then
111*49cdfc7eSAndroid Build Coastguard Worker  echo "** testing xfs **"
112*49cdfc7eSAndroid Build Coastguard Worker  run0=$(($run0+1))
113*49cdfc7eSAndroid Build Coastguard Workerfi
114*49cdfc7eSAndroid Build Coastguard Worker
115*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$jfs"  ]; then
116*49cdfc7eSAndroid Build Coastguard Worker  echo "** testing jfs **"
117*49cdfc7eSAndroid Build Coastguard Worker  run0=$(($run0+1))
118*49cdfc7eSAndroid Build Coastguard Workerfi
119*49cdfc7eSAndroid Build Coastguard Worker
120*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$part2" -a "$run0" -gt 1  ]; then
121*49cdfc7eSAndroid Build Coastguard Worker  echo "** Running extended stress testing **"
122*49cdfc7eSAndroid Build Coastguard Worker  runExtendedStress=1
123*49cdfc7eSAndroid Build Coastguard Workerelif [ -n "$part2" -a "$run0" -eq 1 ]; then
124*49cdfc7eSAndroid Build Coastguard Worker  echo " ** You must pass at least 2 filesystems to run an extended AIO stress test **"
125*49cdfc7eSAndroid Build Coastguard Worker  usage;
126*49cdfc7eSAndroid Build Coastguard Workerfi
127*49cdfc7eSAndroid Build Coastguard Worker
128*49cdfc7eSAndroid Build Coastguard Workerif [ "$run0" -eq 0 ]; then
129*49cdfc7eSAndroid Build Coastguard Worker  echo "No filesystems passed to test"
130*49cdfc7eSAndroid Build Coastguard Worker  echo "Please pass at least one supported filesystem or the -a 1 flag to run all "
131*49cdfc7eSAndroid Build Coastguard Worker  usage;
132*49cdfc7eSAndroid Build Coastguard Workerfi
133*49cdfc7eSAndroid Build Coastguard Worker
134*49cdfc7eSAndroid Build Coastguard Workermkdir $TMP  > /dev/null 2>&1
135*49cdfc7eSAndroid Build Coastguard Workermkdir $TMP/aiodio > /dev/null  2>&1
136*49cdfc7eSAndroid Build Coastguard Workermkdir $TMP/aiodio2 > /dev/null  2>&1
137*49cdfc7eSAndroid Build Coastguard Worker
138*49cdfc7eSAndroid Build Coastguard Workerwhile [ "$runTest" -lt "$run0" ]
139*49cdfc7eSAndroid Build Coastguard Workerdo
140*49cdfc7eSAndroid Build Coastguard Worker
141*49cdfc7eSAndroid Build Coastguard Workerecho "runTest=$runTest run0=$run0 nextTest=$nextTest"
142*49cdfc7eSAndroid Build Coastguard Worker
143*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$ext2" -a $nextTest -eq 0 ]; then
144*49cdfc7eSAndroid Build Coastguard Worker  echo "***************************"
145*49cdfc7eSAndroid Build Coastguard Worker  echo "* Testing ext2 filesystem *"
146*49cdfc7eSAndroid Build Coastguard Worker  echo "***************************"
147*49cdfc7eSAndroid Build Coastguard Worker  mkfs -t ext2 $part1
148*49cdfc7eSAndroid Build Coastguard Worker  mount -t ext2 $part1 $TMP/aiodio
149*49cdfc7eSAndroid Build Coastguard Worker  if [ "$runExtendedStress" -eq 1 -a -n "$ext3" ]; then
150*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext3 $part2
151*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext3 $part2 $TMP/aiodio2
152*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$jfs" ]; then
153*49cdfc7eSAndroid Build Coastguard Worker    mkfs.jfs  $part2 <testscripts/yesenter.txt
154*49cdfc7eSAndroid Build Coastguard Worker    mount -t jfs $part2 $TMP/aiodio2
155*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$xfs" ]; then
156*49cdfc7eSAndroid Build Coastguard Worker    mkfs.xfs -f $part2
157*49cdfc7eSAndroid Build Coastguard Worker    mount -t xfs $part2 $TMP/aiodio2
158*49cdfc7eSAndroid Build Coastguard Worker  fi
159*49cdfc7eSAndroid Build Coastguard Workerelif [ $nextTest -eq 0 ]; then
160*49cdfc7eSAndroid Build Coastguard Worker  nextTest=$(($nextTest+1))
161*49cdfc7eSAndroid Build Coastguard Workerfi
162*49cdfc7eSAndroid Build Coastguard Worker
163*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$ext3" -a $nextTest -eq 1 ]; then
164*49cdfc7eSAndroid Build Coastguard Worker  echo "***************************"
165*49cdfc7eSAndroid Build Coastguard Worker  echo "* Testing ext3 filesystem *"
166*49cdfc7eSAndroid Build Coastguard Worker  echo "***************************"
167*49cdfc7eSAndroid Build Coastguard Worker  mkfs -t ext3 $part1
168*49cdfc7eSAndroid Build Coastguard Worker  mount -t ext3 $part1 $TMP/aiodio
169*49cdfc7eSAndroid Build Coastguard Worker  if [ "$runExtendedStress" -eq 1 -a -n "$jfs" ]; then
170*49cdfc7eSAndroid Build Coastguard Worker    mkfs.jfs  $part2 <testscripts/yesenter.txt
171*49cdfc7eSAndroid Build Coastguard Worker    mount -t jfs $part2 $TMP/aiodio2
172*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$xfs" ]; then
173*49cdfc7eSAndroid Build Coastguard Worker    mkfs.xfs -f $part2
174*49cdfc7eSAndroid Build Coastguard Worker    mount -t xfs $part2 $TMP/aiodio2
175*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$ext2" ]; then
176*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext2 $part2
177*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext2 $part2 $TMP/aiodio2
178*49cdfc7eSAndroid Build Coastguard Worker  fi
179*49cdfc7eSAndroid Build Coastguard Workerelif [ $nextTest -eq 1 ]; then
180*49cdfc7eSAndroid Build Coastguard Worker  nextTest=$(($nextTest+1))
181*49cdfc7eSAndroid Build Coastguard Workerfi
182*49cdfc7eSAndroid Build Coastguard Worker
183*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$jfs" -a $nextTest -eq 2 ]; then
184*49cdfc7eSAndroid Build Coastguard Worker  echo "**************************"
185*49cdfc7eSAndroid Build Coastguard Worker  echo "* Testing jfs filesystem *"
186*49cdfc7eSAndroid Build Coastguard Worker  echo "**************************"
187*49cdfc7eSAndroid Build Coastguard Worker  mkfs.jfs  $part1 <testscripts/yesenter.txt
188*49cdfc7eSAndroid Build Coastguard Worker  mount -t jfs $part1 $TMP/aiodio
189*49cdfc7eSAndroid Build Coastguard Worker  if [ "$runExtendedStress" -eq 1 -a -n "$ext3" ]; then
190*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext3  $part2
191*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext3 $part2 $TMP/aiodio2
192*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$xfs" ]; then
193*49cdfc7eSAndroid Build Coastguard Worker    mkfs.xfs -f $part2
194*49cdfc7eSAndroid Build Coastguard Worker    mount -t xfs $part2 $TMP/aiodio2
195*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$ext2" ]; then
196*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext2 $part2
197*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext2 $part2 $TMP/aiodio2
198*49cdfc7eSAndroid Build Coastguard Worker  fi
199*49cdfc7eSAndroid Build Coastguard Workerelif [ $nextTest -eq 2 ]; then
200*49cdfc7eSAndroid Build Coastguard Worker  nextTest=$(($nextTest+1))
201*49cdfc7eSAndroid Build Coastguard Workerfi
202*49cdfc7eSAndroid Build Coastguard Worker
203*49cdfc7eSAndroid Build Coastguard Workerif [ -n "$xfs" -a $nextTest -eq 3 ]; then
204*49cdfc7eSAndroid Build Coastguard Worker  echo "**************************"
205*49cdfc7eSAndroid Build Coastguard Worker  echo "* Testing xfs filesystem *"
206*49cdfc7eSAndroid Build Coastguard Worker  echo "**************************"
207*49cdfc7eSAndroid Build Coastguard Worker  mkfs.xfs -f $part1
208*49cdfc7eSAndroid Build Coastguard Worker  mount -t xfs $part1 $TMP/aiodio
209*49cdfc7eSAndroid Build Coastguard Worker  if [ "$runExtendedStress" -eq 1 -a -n "$ext2" ]; then
210*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext2 $part2
211*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext2 $part2 $TMP/aiodio2
212*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$ext3" ]; then
213*49cdfc7eSAndroid Build Coastguard Worker    mkfs -t ext3  $part2
214*49cdfc7eSAndroid Build Coastguard Worker    mount -t ext3 $part2 $TMP/aiodio2
215*49cdfc7eSAndroid Build Coastguard Worker  elif [ "$runExtendedStress" -eq 1 -a -n "$jfs" ]; then
216*49cdfc7eSAndroid Build Coastguard Worker    mkfs.jfs  $part2 <testscripts/yesenter.txt
217*49cdfc7eSAndroid Build Coastguard Worker    mount -t jfs $part2 $TMP/aiodio2
218*49cdfc7eSAndroid Build Coastguard Worker  fi
219*49cdfc7eSAndroid Build Coastguard Workerelif [ $nextTest -eq 3 ]; then
220*49cdfc7eSAndroid Build Coastguard Worker  nextTest=$(($nextTest+1))
221*49cdfc7eSAndroid Build Coastguard Workerfi
222*49cdfc7eSAndroid Build Coastguard Worker
223*49cdfc7eSAndroid Build Coastguard WorkernextTest=$(($nextTest+1))
224*49cdfc7eSAndroid Build Coastguard WorkerrunTest=$(($runTest+1))
225*49cdfc7eSAndroid Build Coastguard Worker
226*49cdfc7eSAndroid Build Coastguard Workermkdir $TMP/aiodio/junkdir
227*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/junkfile bs=8192 conv=block,sync
228*49cdfc7eSAndroid Build Coastguard Worker
229*49cdfc7eSAndroid Build Coastguard Workerdate
230*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running aio-stress tests "
231*49cdfc7eSAndroid Build Coastguard Workerecho "current working dir = ${PWD}"
232*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aio-stress.part1 -o ${TMPBASE}/ltp-aio-stress.part1
233*49cdfc7eSAndroid Build Coastguard Worker
234*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiostresspart1 -n ltp-aiostresspart1 -l ltpaiostress.logfile -o ltpaiostress.outfile -p -f ${TMPBASE}/ltp-aio-stress.part1 &
235*49cdfc7eSAndroid Build Coastguard Worker
236*49cdfc7eSAndroid Build Coastguard Workerwait $!
237*49cdfc7eSAndroid Build Coastguard Worker
238*49cdfc7eSAndroid Build Coastguard Workersync
239*49cdfc7eSAndroid Build Coastguard Workerecho "************ End Running aio-stress tests "
240*49cdfc7eSAndroid Build Coastguard Workerecho ""
241*49cdfc7eSAndroid Build Coastguard Worker
242*49cdfc7eSAndroid Build Coastguard Workerif [ "$runExtendedStress" -eq 1 ];then
243*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running EXTENDED aio-stress tests "
244*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aio-stress.part2 -o ${TMPBASE}/ltp-aio-stress.part2
245*49cdfc7eSAndroid Build Coastguard Worker
246*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiostresspart2 -n ltp-aiostresspart2 -l ltpaiostress.logfile -o ltpaiostress.outfile -p -f ${TMPBASE}/ltp-aio-stress.part2 &
247*49cdfc7eSAndroid Build Coastguard Worker
248*49cdfc7eSAndroid Build Coastguard Workerwait $!
249*49cdfc7eSAndroid Build Coastguard Workersync
250*49cdfc7eSAndroid Build Coastguard Workerfi
251*49cdfc7eSAndroid Build Coastguard Worker
252*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/junkfile bs=8192 conv=block,sync
253*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/fff      bs=4096 conv=block,sync
254*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/ff1      bs=2048 conv=block,sync
255*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/ff2      bs=1024 conv=block,sync
256*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/ff3      bs=512  conv=block,sync
257*49cdfc7eSAndroid Build Coastguard Worker
258*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running aiocp tests "
259*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aiodio.part1 -o ${TMPBASE}/ltp-aiodio.part1
260*49cdfc7eSAndroid Build Coastguard Worker
261*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiodiopart1 -n ltp-aiodiopart1 -l ltpaiodio1.logfile -o ltpaiodio1.outfile -p -f ${TMPBASE}/ltp-aiodio.part1 &
262*49cdfc7eSAndroid Build Coastguard Worker
263*49cdfc7eSAndroid Build Coastguard Workerwait $!
264*49cdfc7eSAndroid Build Coastguard Workersync
265*49cdfc7eSAndroid Build Coastguard Workerecho "************ End Running aiocp tests "
266*49cdfc7eSAndroid Build Coastguard Workerecho ""
267*49cdfc7eSAndroid Build Coastguard Worker
268*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running aiodio_sparse tests "
269*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aiodio.part2 -o ${TMPBASE}/ltp-aiodio.part2
270*49cdfc7eSAndroid Build Coastguard Worker
271*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiodiopart2 -n ltp-aiodiopart2 -l ltpaiodio2.logfile -o ltpaiodio2.outfile -p -f ${TMPBASE}/ltp-aiodio.part2 &
272*49cdfc7eSAndroid Build Coastguard Worker
273*49cdfc7eSAndroid Build Coastguard Workerwait $!
274*49cdfc7eSAndroid Build Coastguard Workersync
275*49cdfc7eSAndroid Build Coastguard Workerecho "************ End Running aiodio_sparse tests "
276*49cdfc7eSAndroid Build Coastguard Workerecho ""
277*49cdfc7eSAndroid Build Coastguard Worker
278*49cdfc7eSAndroid Build Coastguard Worker
279*49cdfc7eSAndroid Build Coastguard Workerif [ "$runExtendedStress" -eq 1 ];then
280*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running fsx-linux tests "
281*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aiodio.part3 -o ${TMPBASE}/ltp-aiodio.part3
282*49cdfc7eSAndroid Build Coastguard Worker
283*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiodiopart3 -n ltp-aiodiopart3 -l ltpaiodio3.logfile -o ltpaiodio3.outfile -p -f ${TMPBASE}/ltp-aiodio.part3 &
284*49cdfc7eSAndroid Build Coastguard Worker
285*49cdfc7eSAndroid Build Coastguard Worker
286*49cdfc7eSAndroid Build Coastguard Worker
287*49cdfc7eSAndroid Build Coastguard Workerwait $!
288*49cdfc7eSAndroid Build Coastguard Workersync
289*49cdfc7eSAndroid Build Coastguard Workerfi
290*49cdfc7eSAndroid Build Coastguard Worker
291*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/file2      bs=2048 conv=block,sync
292*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/file3      bs=1024 conv=block,sync
293*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/file4      bs=512  conv=block,sync
294*49cdfc7eSAndroid Build Coastguard Workerdd if=$file1 of=$TMP/aiodio/file5      bs=4096 conv=block,sync
295*49cdfc7eSAndroid Build Coastguard Worker
296*49cdfc7eSAndroid Build Coastguard Worker
297*49cdfc7eSAndroid Build Coastguard Worker
298*49cdfc7eSAndroid Build Coastguard Worker
299*49cdfc7eSAndroid Build Coastguard Workerecho "************ Running dio_sparse & miscellaneous tests "
300*49cdfc7eSAndroid Build Coastguard Workersort -R ${LTPROOT}/runtest/ltp-aiodio.part4 -o ${TMPBASE}/ltp-aiodio.part4
301*49cdfc7eSAndroid Build Coastguard Worker${LTPROOT}/bin/ltp-pan -e -S -a ltpaiodiopart4 -n ltp-aiodiopart4 -l ltpaiodio4.logfile -o ltpaiodio4.outfile -p -f ${TMPBASE}/ltp-aiodio.part4 &
302*49cdfc7eSAndroid Build Coastguard Worker
303*49cdfc7eSAndroid Build Coastguard Workerwait $!
304*49cdfc7eSAndroid Build Coastguard Workersync
305*49cdfc7eSAndroid Build Coastguard Workerecho "************ End Running dio_sparse & miscellaneous tests "
306*49cdfc7eSAndroid Build Coastguard Workerecho ""
307*49cdfc7eSAndroid Build Coastguard Worker
308*49cdfc7eSAndroid Build Coastguard Workerecho "************ Cleaning/Umounting"
309*49cdfc7eSAndroid Build Coastguard Worker
310*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/fff
311*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/ff1
312*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/ff2
313*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/ff3
314*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/junkfile*
315*49cdfc7eSAndroid Build Coastguard Workerrm -f $TMP/aiodio/file*
316*49cdfc7eSAndroid Build Coastguard Workerrm -rf $TMP/aiodio/junkdir
317*49cdfc7eSAndroid Build Coastguard Worker
318*49cdfc7eSAndroid Build Coastguard Workerumount $part1
319*49cdfc7eSAndroid Build Coastguard Worker
320*49cdfc7eSAndroid Build Coastguard Workerif [ "$runExtendedStress" -eq 1 ]; then
321*49cdfc7eSAndroid Build Coastguard Worker      umount $part2
322*49cdfc7eSAndroid Build Coastguard Workerfi
323*49cdfc7eSAndroid Build Coastguard Worker
324*49cdfc7eSAndroid Build Coastguard Worker
325*49cdfc7eSAndroid Build Coastguard Workerdone
326*49cdfc7eSAndroid Build Coastguard Workerdate
327*49cdfc7eSAndroid Build Coastguard Workerecho "AIO/DIO test complete "
328