re-enable munmap().
[minix.git] / commands / swifi / run_swifi
blob85534196beb6f3e34d982562f0a9367c9096ae0b
1 #!/bin/sh
3 LABEL=dp8390
4 EXEDIR=/usr/build/drivers/dp8390
5 EXE=$EXEDIR/$LABEL
7 :>log
9 do_one()
11 # $1 = test-nr, $2 = count, $3 = seed
12 pid=''
13 while [ X"$pid" = X ]
15 pid=`ps ax | grep $LABEL | grep -v grep |
16 sed 's,^[ ]*,,;s,[ ].*,,`
17 if [ X"$pid" != X ]
18 then
19 break
21 sleep 10
22 done
23 echo pid = $pid
24 ./swifi -f $EXE $pid $1 $2 $3 >/tmp/out
25 sleep 1
26 kill -0 $pid &&
27 echo "driver failed to die, params: test $1, count $2, seed $3"
30 one_round()
32 # $1 = count, $2 = seed
33 count=$1
34 seed=$2
35 echo "Seed: $seed" >> log
36 sync
37 do_one 6 $count $seed # Source fault
38 do_one 5 $count $seed # Destination fault
39 do_one 8 $count $seed # Pointer fault
40 do_one 14 $count $seed # Interface fault
41 do_one 12 $count $seed # Loop fault
42 do_one 0 $count $seed # Text fault
43 do_one 4 $count $seed # Nop fault
46 # Start our own driver.
47 service down $LABEL
48 sleep 10 # Allow driver to die
49 service up $EXE -script `pwd`/rs.restart_imm -config /etc/drivers.conf -period 3HZ
51 i=0
52 i=4000
53 while [ $i -lt 10000 ]
55 echo "Seed: $i"
56 one_round 100 $i
57 i=`expr $i + 1`
58 done