mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-30 19:39:34 -05:00
Fixup testsetup for VM tests (testcode/run_vm.sh).
git-svn-id: file:///svn/unbound/trunk@3147 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
bc7f906590
commit
43f3b0623f
33 changed files with 79 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
24 June 2014: Wouter
|
||||
- Fix caps-for-id fallback, and added fallback attempt when servers
|
||||
drop 0x20 perturbed queries.
|
||||
- Fixup testsetup for VM tests (testcode/run_vm.sh).
|
||||
|
||||
17 June 2014: Wouter
|
||||
- iana portlist updated.
|
||||
|
|
|
|||
78
testcode/run_vm.sh
Normal file
78
testcode/run_vm.sh
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
#!/usr/local/bin/bash
|
||||
# run tpkg tests from within a VM. Looks for loopback addr.
|
||||
# if run not from within a VM, runs the tests as usual.
|
||||
# with one argument: run that tpkg, otherwise, run all tpkgs.
|
||||
|
||||
get_lo0_ip4() {
|
||||
if test -x /sbin/ifconfig
|
||||
then
|
||||
LO0_IP4=`/sbin/ifconfig lo0 | grep '[^0-9]127\.' | sed -e 's/^[^1]*\(127\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[^0-9]*.*$/\1/g'`
|
||||
if ( echo $LO0_IP4 | grep '^127\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$' > /dev/null )
|
||||
then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
LO0_IP4=127.0.0.1
|
||||
}
|
||||
get_lo0_ip4
|
||||
export LO0_IP4
|
||||
if test "x$LO0_IP4" = "x127.0.0.1"
|
||||
then
|
||||
ALT_LOOPBACK=false
|
||||
else
|
||||
ALT_LOOPBACK=true
|
||||
fi
|
||||
cd testdata
|
||||
TPKG=../testcode/mini_tpkg.sh
|
||||
#RUNLIST=`(ls -1 *.tpkg|grep -v '^0[016]')`
|
||||
RUNLIST=`(ls -1 *.tpkg)`
|
||||
if test "$#" = "1"; then RUNLIST="$1"; fi
|
||||
|
||||
# fix up tpkg that was edited on keyboard interrupt.
|
||||
cleanup() {
|
||||
echo cleanup
|
||||
if test -f "$t.bak"; then mv "$t.bak" "$t"; fi
|
||||
exit 0
|
||||
}
|
||||
trap cleanup SIGINT
|
||||
|
||||
for t in $RUNLIST
|
||||
do
|
||||
if ! $ALT_LOOPBACK
|
||||
then
|
||||
$TPKG exe $t
|
||||
continue
|
||||
fi
|
||||
# We have alternative 127.0.0.1 number
|
||||
if ( echo $t | grep '6\.tpkg$' ) # skip IPv6 tests
|
||||
then
|
||||
continue
|
||||
elif test "$t" = "edns_cache.tpkg" # This one is IPv6 too!
|
||||
then
|
||||
continue
|
||||
fi
|
||||
cp -p "$t" "$t.bak"
|
||||
tar xzf $t
|
||||
find "${t%.tpkg}.dir" -type f \
|
||||
-exec grep -q -e '127\.0\.0\.1' -e '@localhost' {} \; -print | {
|
||||
while read f
|
||||
do
|
||||
sed "s/127\.0\.0\.1/${LO0_IP4}/g" "$f" > "$f._"
|
||||
mv "$f._" "$f"
|
||||
sed "s/@localhost/@${LO0_IP4}/g" "$f" > "$f._"
|
||||
mv "$f._" "$f"
|
||||
done
|
||||
}
|
||||
find "${t%.tpkg}.dir" -type d -name "127.0.0.1" -print | {
|
||||
while read d
|
||||
do
|
||||
mv -v "$d" "${d%127.0.0.1}${LO0_IP4}"
|
||||
done
|
||||
}
|
||||
tar czf $t "${t%.tpkg}.dir"
|
||||
rm -fr "${t%.tpkg}.dir"
|
||||
$TPKG exe $t
|
||||
mv "$t.bak" "$t"
|
||||
done
|
||||
# get out of testdata/
|
||||
cd ..
|
||||
BIN
testdata/09-unbound-control.tpkg
vendored
BIN
testdata/09-unbound-control.tpkg
vendored
Binary file not shown.
BIN
testdata/ctrl_itr.tpkg
vendored
BIN
testdata/ctrl_itr.tpkg
vendored
Binary file not shown.
BIN
testdata/edns_lame.tpkg
vendored
BIN
testdata/edns_lame.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_bogus.tpkg
vendored
BIN
testdata/fwd_bogus.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_capsid.tpkg
vendored
BIN
testdata/fwd_capsid.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_capsid_fallback.tpkg
vendored
BIN
testdata/fwd_capsid_fallback.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_compress_c00c.tpkg
vendored
BIN
testdata/fwd_compress_c00c.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_edns_bksec.tpkg
vendored
BIN
testdata/fwd_edns_bksec.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_edns_probe.tpkg
vendored
BIN
testdata/fwd_edns_probe.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_no_edns.tpkg
vendored
BIN
testdata/fwd_no_edns.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_oneport.tpkg
vendored
BIN
testdata/fwd_oneport.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_tcp.tpkg
vendored
BIN
testdata/fwd_tcp.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_tcp_tc.tpkg
vendored
BIN
testdata/fwd_tcp_tc.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_three.tpkg
vendored
BIN
testdata/fwd_three.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_three_service.tpkg
vendored
BIN
testdata/fwd_three_service.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_ttlexpire.tpkg
vendored
BIN
testdata/fwd_ttlexpire.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_udp.tpkg
vendored
BIN
testdata/fwd_udp.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_udptmout.tpkg
vendored
BIN
testdata/fwd_udptmout.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_waitudp.tpkg
vendored
BIN
testdata/fwd_waitudp.tpkg
vendored
Binary file not shown.
BIN
testdata/fwd_zero.tpkg
vendored
BIN
testdata/fwd_zero.tpkg
vendored
Binary file not shown.
BIN
testdata/local_nodefault.tpkg
vendored
BIN
testdata/local_nodefault.tpkg
vendored
Binary file not shown.
BIN
testdata/local_norec.tpkg
vendored
BIN
testdata/local_norec.tpkg
vendored
Binary file not shown.
BIN
testdata/local_nosnoop.tpkg
vendored
BIN
testdata/local_nosnoop.tpkg
vendored
Binary file not shown.
BIN
testdata/remote-threaded.tpkg
vendored
BIN
testdata/remote-threaded.tpkg
vendored
Binary file not shown.
BIN
testdata/speed_cache.tpkg
vendored
BIN
testdata/speed_cache.tpkg
vendored
Binary file not shown.
BIN
testdata/speed_local.tpkg
vendored
BIN
testdata/speed_local.tpkg
vendored
Binary file not shown.
BIN
testdata/stat_timer.tpkg
vendored
BIN
testdata/stat_timer.tpkg
vendored
Binary file not shown.
BIN
testdata/stream_ssl.tpkg
vendored
BIN
testdata/stream_ssl.tpkg
vendored
Binary file not shown.
BIN
testdata/stream_tcp.tpkg
vendored
BIN
testdata/stream_tcp.tpkg
vendored
Binary file not shown.
BIN
testdata/stub_udp.tpkg
vendored
BIN
testdata/stub_udp.tpkg
vendored
Binary file not shown.
BIN
testdata/tcp_sigpipe.tpkg
vendored
BIN
testdata/tcp_sigpipe.tpkg
vendored
Binary file not shown.
Loading…
Reference in a new issue