kernel: scheduling fix for ARM
[minix.git] / commands / swifi / run_swifi-x
blob14b0934442fe6b5184522c1d0d2b130778f6e639
1 #!/bin/sh
2 do_one()
4 # $1 = test-nr, $2 = count, $3 = seed
5 pid=''
6 while [ X"$pid" = X ]
7 do
8 pid=`ps ax | grep dp8390 | grep usr.sbin |
9 sed 's,^[ ]*,,;s,[ ].*,,`
10 sleep 1
11 done
12 echo pid = $pid
13 ./swifi -f /usr/build/drivers/dp8390/dp8390 $pid $1 $2 $3 >/tmp/out
14 sleep 5
15 kill -0 $pid &&
16 echo "driver failed to die, params: test $1, count $2, seed $3"
19 one_round()
21 # $1 = count, $2 = seed
22 count=$1
23 seed=$2
24 do_one 6 $count $seed # Source fault
25 do_one 5 $count $seed # Destination fault
26 do_one 8 $count $seed # Pointer fault
27 do_one 14 $count $seed # Interface fault
28 do_one 12 $count $seed # Loop fault
29 do_one 0 $count $seed # Text fault
30 do_one 4 $count $seed # Nop fault
33 i=4
34 while [ $i -lt 100 ]
36 echo "Seed: $i"
37 one_round 100 $i
38 i=`expr $i + 1`
39 done