6 DAYTIME_HOST
=jetsam.cs.vu.
nl
17 # $1 = test-nr, $2 = count, $3 = seed
21 pid
=`ps ax | grep $LABEL | grep -v grep |
22 sed 's,^[ ]*,,;s,[ ].*,,'`
30 swifi
-f $EXE $pid $1 $2 $3 >/tmp
/out
32 fault_blocks
=`expr $fault_blocks + 1`
35 if [ $dont_connect -eq 0 ]
37 if .
/socket
-t 10 $DAYTIME_HOST daytime
< /dev
/null
39 connect_blocks
=`expr $connect_blocks + 1`
44 echo "driver failed to die, params: test $1, count $2, seed $3"
46 connect_blocks
=`expr $connect_blocks + 1`
47 echo "driver crashed after $fault_blocks blocks"
48 echo "driver failed to connect after $connect_blocks blocks"
57 # $1 = count, $2 = seed
60 echo "Seed: $seed" >> log
62 do_one
6 $count $seed # Source fault
63 do_one
5 $count $seed # Destination fault
64 do_one
8 $count $seed # Pointer fault
65 do_one
14 $count $seed # Interface fault
66 do_one
12 $count $seed # Loop fault
67 do_one
0 $count $seed # Text fault
68 do_one
4 $count $seed # Nop fault
73 echo "Usage: run_t2 <count> <type> <seed>" >&2
75 "Valid types are: source destination pointer interface loop text nop random" >&2
81 # $1 = index, $2... = choices
83 index
=`expr "$index" + 1`
85 v
=`eval echo '$'$index`
93 r
=`./rnd -m 7 -s "$seed"`
94 select_from
"$r" 6 5 8 14 12 0 4
97 if [ $# -ne 3 ]; then usage
; fi
105 destination
) type_arg
=5
109 interface
) type_arg
=14
123 # Start our own driver.
124 minix-service down
$LABEL
125 sleep 10 # Allow driver to die
126 minix-service up
$EXE -script `pwd`/rs.restart_imm
-period 3HZ
129 while [ $i -lt "$count" ]
132 if [ "$type" = "random" ]
134 type_arg
=`random_type $seed`
136 do_one
"$type_arg" $FAULTS_PER_BLOCK $seed
138 seed
=`expr $seed + 1`
141 connect_blocks
=`expr $connect_blocks + 1`
142 echo "driver crashed after $fault_blocks blocks"
143 echo "driver failed to connect after $connect_blocks blocks"
146 minix-service refresh
$LABEL