4 EXEDIR
=/usr
/build
/drivers
/es1371
6 #EXEDIR=/usr/build/drivers/fxp
14 # $1 = test-nr, $2 = count, $3 = seed
18 ps ax |
grep $LABEL |
grep -v grep
19 pid
=`ps ax | grep $LABEL | grep -v grep |
21 sed 's,^[ ]*,,;s,[ ].*,,`
29 .
/swifi
-f $EXE $pid $1 $2 $3 >/tmp
/out
32 echo "driver failed to die, params: test $1, count $2, seed $3"
37 # $1 = count, $2 = seed
40 echo "Seed: $seed" >> log
42 do_one
6 $count $seed # Source fault
43 do_one
5 $count $seed # Destination fault
44 do_one
8 $count $seed # Pointer fault
45 do_one
14 $count $seed # Interface fault
46 do_one
12 $count $seed # Loop fault
47 do_one
0 $count $seed # Text fault
48 do_one
4 $count $seed # Nop fault
53 echo "Usage: run_t1 <count> <type> <seed>" >&2
55 "Valid types are: source destination pointer interface loop text nop random" >&2
61 # $1 = index, $2... = choices
63 index
=`expr "$index" + 1`
65 v
=`eval echo '$'$index`
73 r
=`./rnd -m 7 -s "$seed"`
74 select_from
"$r" 6 5 8 14 12 0 4
77 if [ $# -ne 3 ]; then usage
; fi
85 destination
) type_arg
=5
89 interface
) type_arg
=14
103 # Start our own driver.
105 sleep 2 # Allow driver to die
106 service up
$EXE -script `pwd`/rs.restart_imm
-period 3HZ
$DEV
109 while [ $i -lt "$count" ]
112 if [ "$type" = "random" ]
114 type_arg
=`random_type $seed`
116 do_one
"$type_arg" 100 $seed
118 seed
=`expr $seed + 1`
122 service refresh
$LABEL