e090013056
/etc CHANGES: - /etc/drivers.conf has been renamed to /etc/system.conf. Every entry in the file is now marked as "service" rather than driver. - user "service" has been added to password file /etc/passwd. - docs/UPDATING updated accordingly, as well as every other mention to the old drivers.conf in the system. RS CHANGES: - No more distinction between servers and drivers. - RS_START has been renamed to RS_UP and the old legacy RS_UP and RS_UP_COPY dropped. - RS asks PCI to set / remove ACL entries only for services whose ACL properties have been set. This change eliminates unnecessary warnings. - Temporarily minimize the risk of potential races at boot time or when starting a new service. Upcoming changes will eliminate races completely. - General cleanup.
58 lines
1 KiB
Bash
58 lines
1 KiB
Bash
#!/bin/sh
|
|
|
|
LABEL=dp8390
|
|
EXEDIR=/usr/build/drivers/dp8390
|
|
EXE=$EXEDIR/$LABEL
|
|
|
|
:>log
|
|
|
|
do_one()
|
|
{
|
|
# $1 = test-nr, $2 = count, $3 = seed
|
|
pid=''
|
|
while [ X"$pid" = X ]
|
|
do
|
|
pid=`ps ax | grep $LABEL | grep -v grep |
|
|
sed 's,^[ ]*,,;s,[ ].*,,`
|
|
if [ X"$pid" != X ]
|
|
then
|
|
break
|
|
fi
|
|
sleep 10
|
|
done
|
|
echo pid = $pid
|
|
./swifi -f $EXE $pid $1 $2 $3 >/tmp/out
|
|
sleep 1
|
|
kill -0 $pid &&
|
|
echo "driver failed to die, params: test $1, count $2, seed $3"
|
|
}
|
|
|
|
one_round()
|
|
{
|
|
# $1 = count, $2 = seed
|
|
count=$1
|
|
seed=$2
|
|
echo "Seed: $seed" >> log
|
|
sync
|
|
do_one 6 $count $seed # Source fault
|
|
do_one 5 $count $seed # Destination fault
|
|
do_one 8 $count $seed # Pointer fault
|
|
do_one 14 $count $seed # Interface fault
|
|
do_one 12 $count $seed # Loop fault
|
|
do_one 0 $count $seed # Text fault
|
|
do_one 4 $count $seed # Nop fault
|
|
}
|
|
|
|
# Start our own driver.
|
|
service down $LABEL
|
|
sleep 10 # Allow driver to die
|
|
service up $EXE -script `pwd`/rs.restart_imm -config /etc/system.conf -period 3HZ
|
|
|
|
i=0
|
|
i=4000
|
|
while [ $i -lt 10000 ]
|
|
do
|
|
echo "Seed: $i"
|
|
one_round 100 $i
|
|
i=`expr $i + 1`
|
|
done
|