diff options
Diffstat (limited to 'fw/test')
| -rwxr-xr-x | fw/test/fwtest.rc | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/fw/test/fwtest.rc b/fw/test/fwtest.rc index dbd7754..904a055 100755 --- a/fw/test/fwtest.rc +++ b/fw/test/fwtest.rc @@ -51,7 +51,7 @@ mkdir -p $mtpt # The stacks the packet checks build for themselves. Fixed numbers are # fine because they are unbound again at the end of each block, and the # last check proves it. -stacks=(20 21 22 23 24 25 26 27 28) +stacks=(20 21 22 23 24 25 26 27 28 29 30) # A port of our own. Conversations outlive the run that made them - a # devip Conv is never freed - so a fixed port makes one run's leftovers @@ -669,6 +669,39 @@ echo '== supervision' check 'and the interface it made goes with it' maxtu $"r } +echo '== where the control files are mounted' +# mntgen makes names one level deep, so a single one over /mnt gives +# /mnt/fw and never /mnt/fw/ether0 - which is what fw is told to mount +# on, one directory per card. Both the boot script and the service +# file put a second mntgen over /mnt/fw for that reason, and this is +# the fact they rest on. +@{ + rfork n + mkdir -p $tmp/mnt2 + bind -c $tmp/mnt2 /mnt + mntgen /mnt </dev/null >/dev/null >[2]/dev/null + sleep 1 + r=`{if(test -d /mnt/fw) echo yes; if not echo no} + check 'one mntgen over /mnt makes /mnt/fw' yes $"r + r=`{if(test -d /mnt/fw/ether0) echo yes; if not echo no} + check 'but not /mnt/fw/ether0, which is where fw is told to mount' no $"r + + mntgen /mnt/fw </dev/null >/dev/null >[2]/dev/null + sleep 1 + r=`{if(test -d /mnt/fw/ether0) echo yes; if not echo no} + check 'a second one over /mnt/fw does' yes $"r + + bind -a '#I29' $nA + bind -a '#I30' $nB + $fw -m /mnt/fw/ether0 $tmp/empty.ndb \ + $nA^'!'^10.9.9.1^'!'^/24 $nB^'!'^10.9.9.2^'!'^/24 \ + </dev/null >/dev/null >[2]/dev/null + sleep 3 + r=`{ls /mnt/fw/ether0 | wc -l} + check 'and fw mounts its control files there' 4 $"r + stopfw $nA $nB +} + echo '== fwstart' if(test -f $lib/fwstart) @{ |
