- Convert tdir tests to use the new skip_test functionality.

This commit is contained in:
George Thessalonikefs 2022-09-20 14:45:20 +02:00
parent 307805b64f
commit 9b1647ebae
87 changed files with 131 additions and 232 deletions

View File

@ -1,3 +1,6 @@
20 September 2022: George
- Convert tdir tests to use the new skip_test functionality.
16 September 2022: George
- Merge #753: ACL per interface. (New interface-* configuration
options).

View File

@ -55,14 +55,14 @@ if test "$1" = "-f" && test "$2" = "report"; then
pass=`expr $pass + 1`
fi
elif test -f ".skip-$name"; then
echo ">> SKIPPED<< $timelen $name: $desc"
echo ".. SKIPPED.. $timelen $name: $desc"
skip=`expr $pass + 1`
else
if test -f "result.$name"; then
echo "!! FAILED !! $timelen $name: $desc"
fail=`expr $fail + 1`
else
echo ">> SKIPPED<< $timelen $name: $desc"
echo ".. SKIPPED.. $timelen $name: $desc"
skip=`expr $skip + 1`
fi
fi
@ -86,13 +86,13 @@ if test "$1" = "report" || test "$2" = "report"; then
fi
elif test -f ".skip-$name"; then
if test $quiet = 0; then
echo ">> SKIPPED<< : $name"
echo ".. SKIPPED.. : $name"
fi
else
if test -f "result.$name"; then
echo "!! FAILED !! : $name"
else
echo ">> SKIPPED<< : $name"
echo ".. SKIPPED.. : $name"
fi
fi
done

View File

@ -8,7 +8,7 @@ Component:
CmdDepends:
Depends:
Help:
Pre:
Pre: 07-confroot.pre
Post:
Test: 07-confroot.test
AuxFiles:

View File

@ -0,0 +1,13 @@
# #-- 07-confroot.pre --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
if uname | grep "MINGW" >/dev/null; then
# no chroot, no need to test.
# (test fails on / and \ comparisons, by the way).
skip_test "no chroot on windows, end test"
fi

View File

@ -6,13 +6,6 @@
PRE="../.."
if uname | grep "MINGW" >/dev/null; then
# no chroot, no need to test.
# (test fails on / en \ comparisons, by the way).
echo "no chroot on windows, end test"
exit 0
fi
# create config file
cwd=`pwd -P`
subdir=$cwd/subdir

View File

@ -4,7 +4,16 @@
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
. ../common.sh
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
# nothing
:
else
skip_test "forking is not available; test skipped."
fi
get_random_port 2
FWD_PORT=$(($RND_PORT + 1))
echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test

View File

@ -7,14 +7,6 @@
PRE="../.."
. ../common.sh
if grep FORK $PRE/config.h | grep "define" >/dev/null 2>&1; then
# nothing
:
else
echo "forking is not available; test skipped."
exit 0
fi
# test if fwder is up
echo "> dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile"
dig @127.0.0.1 -p $FWD_PORT www.example.com | tee outfile

View File

@ -7,7 +7,7 @@ Category:
Component:
Depends:
Help:
Pre:
Pre: clang-analysis.pre
Post:
Test: clang-analysis.test
AuxFiles:

View File

@ -0,0 +1,21 @@
# #-- clang-analysis.pre --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
# common functions
. ../common.sh
PRE="../.."
if test ! -x "`which clang 2>&1`"; then
skip_test "No clang in path"
fi
#echo "have clang"
# test if assertions are enabled
if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
:
else
skip_test "UNBOUND_DEBUG is not enabled, skip test"
# no unbound debug means no assertions, and clang analyzer uses
# the assertions to make inferences.
fi

View File

@ -7,20 +7,6 @@
. ../common.sh
PRE="../.."
if test ! -x "`which clang 2>&1`"; then
echo "No clang in path"
exit 0
fi
#echo "have clang"
# test if assertions are enabled
if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
:
else
echo "UNBOUND_DEBUG is not enabled, skip test"
# no unbound debug means no assertions, and clang analyzer uses
# the assertions to make inferences.
exit 0
fi
# read value from Makefile
# $1: result variable name

View File

@ -8,9 +8,6 @@
PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
kill_pid $FWD_PID
kill_pid $UNBOUND_PID

View File

@ -8,7 +8,11 @@ PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
echo "have dnscrypt"
else
skip_test "no dnscrypt"
fi
get_random_port 3
UNBOUND_PORT=$RND_PORT

View File

@ -7,9 +7,6 @@
PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
# do the test
# Query plain request over DNSCrypt channel get closed

View File

@ -1,16 +0,0 @@
# dnscrypt precheck.sh
# if no dnscrypt; exit
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
echo "have dnscrypt"
else
echo "no dnscrypt"
exit 0
fi
# if no xchacha20 support in unbound; exit
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
xchacha20=1
else
xchacha20=0
fi

View File

@ -8,10 +8,5 @@
PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
kill_pid $FWD_PID
if [ $xchacha20 -ne 0 ]; then
kill_pid $UNBOUND_PID
fi
kill_pid $UNBOUND_PID

View File

@ -7,8 +7,17 @@
PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
# if no dnscrypt; exit
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
echo "have dnscrypt"
else
skip_test "no dnscrypt"
fi
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
echo "have XChacha20 support"
else
skip_test "no XChacha20 support"
fi
get_random_port 3
UNBOUND_PORT=$RND_PORT
@ -34,10 +43,5 @@ echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
cat .tpkg.var.test
wait_ldns_testns_up fwd.log
if [ $xchacha20 -eq 0 ]; then
# no xchacha20 support, we expect unbound to exit with an error message.
wait_server_up unbound.log "Certificate for XChacha20 but libsodium does not support it"
else
wait_unbound_up unbound.log
fi
wait_unbound_up unbound.log

View File

@ -6,17 +6,9 @@
PRE="../.."
. ../common.sh
# Check if we can run the test.
. ./precheck.sh
# do the test
if [ $xchacha20 -eq 0 ]; then
# Unbound would exit before we can attempt any tests.
echo "OK"
exit 0
fi
# Query plain request over DNSCrypt channel get closed
# We use TCP to avoid hanging on waiting for UDP.
# We expect `outfile` to contain no DNS payload
@ -104,7 +96,7 @@ do
echo "> check answer"
grep -F 'DNSC\000\002\000\000\1716\226\255*\244\002L\177g\025_\127tR\151\246R\203\178\153\248\006\137\"\138\173|G/,\160\152\015\010\172\184\220`\175\217\255,\162\018\178-d\007\246k0\003I[\205w\026)\204B\002\161\010\245\243W\191\189Z\216\210x\025\204\247\173\227t\138\018\162~\152\253\211\031z\\\002m5\008\254\2244\246\243W\191\189Z\216\210Y\160\2158Y\160\2158u\210\219\184' outfile
cert_found=$?
if [ \( $cert_found -eq 0 -a $xchacha20 -eq 1 \) -o \( $cert_found -ne 0 -a $xchacha20 -eq 0 \) ]; then
if [ \( $cert_found -eq 0 \) ]; then
echo "OK"
else
echo "Not OK"

View File

@ -1,16 +0,0 @@
# dnscrypt precheck.sh
# if no dnscrypt; exit
if grep "define USE_DNSCRYPT 1" $PRE/config.h; then
echo "have dnscrypt"
else
echo "no dnscrypt"
exit 0
fi
# if no xchacha20 support in unbound; exit
if grep "define USE_DNSCRYPT_XCHACHA20 1" $PRE/config.h; then
xchacha20=1
else
xchacha20=0
fi

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 3
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 3
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill $UNBOUND_PID

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 4
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# test if the server is up.
echo "> dig www.example.com."

View File

@ -6,7 +6,6 @@
#
# do your teardown here
PRE="../.."
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
. ../common.sh
kill_pid $FWD_PID
kill_pid $UNBOUND_PID

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 2
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
get_make
(cd $PRE; $MAKE dohclient)

View File

@ -6,7 +6,6 @@
#
# do your teardown here
PRE="../.."
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
. ../common.sh
kill_pid $UNBOUND_PID
cat unbound.log

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 1
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
get_make
(cd $PRE; $MAKE dohclient)

View File

@ -7,6 +7,5 @@
# do your teardown here
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $UNBOUND_PID
cat unbound.log

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 1
UNBOUND_PORT=$RND_PORT
echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test

View File

@ -6,7 +6,6 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
get_make
(cd $PRE; $MAKE dohclient)

View File

@ -6,7 +6,6 @@
#
# do your teardown here
PRE="../.."
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
. ../common.sh
kill_pid $FWD_PID
kill_pid $UNBOUND_PID

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 2
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
get_make
(cd $PRE; $MAKE dohclient)

View File

@ -7,7 +7,6 @@
# do your teardown here
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $FWD_PID
kill_pid $UNBOUND_PID
cat unbound.log

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 2
UNBOUND_PORT=$RND_PORT
FWD_PORT=$(($RND_PORT + 1))

View File

@ -6,7 +6,6 @@
PRE="../.."
. ../common.sh
if grep "define HAVE_NGHTTP2 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
get_make
(cd $PRE; $MAKE dohclient)

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $FWD_PID
kill $UNBOUND_PID
kill $UNBOUND_PID >/dev/null 2>&1

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 3
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define WITH_DYNLIBMODULE 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# compile the dynamic library module
if grep "define USE_WINSOCK 1" $PRE/config.h; then

View File

@ -6,11 +6,6 @@
#
# do your teardown here
. ../common.sh
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
echo "In jail, no ::1, skip test"
exit 0
fi
kill_pid $FWD_PID
if fgrep "service stopped" unbound.log; then
exit 0

View File

@ -6,8 +6,7 @@
. ../common.sh
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
echo "In jail, no ::1, skip test"
exit 0
skip_test "In jail, no ::1, skip test"
fi
get_random_port 2
@ -38,7 +37,6 @@ wait_ldns_testns_up fwd.log
# string 'Start of service' in log.
wait_server_up_or_fail unbound.log "start of service" "disable interface-automatic"
if fgrep "disable interface-automatic" unbound.log; then
echo "skip test"
exit 1
skip_test "skip test"
fi

View File

@ -7,11 +7,6 @@
PRE="../.."
. ../common.sh
if test `hostname`"" = "dicht.nlnetlabs.nl"; then
echo "In jail, no ::1, skip test"
exit 0
fi
if fgrep "disable interface-automatic" unbound.log; then
echo "skip test"
exit 0

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $FWD_PID
kill_pid $UNBOUND_PID
cat unbound.log

View File

@ -7,7 +7,7 @@
. ../common.sh
PRE="../.."
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 2
UNBOUND_PORT=$RND_PORT

View File

@ -6,7 +6,6 @@
. ../common.sh
PRE="../.."
if grep "define USE_IPSET 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
# Make all the queries. They need to succeed by the way.
echo "> dig www.example.net."

View File

@ -8,7 +8,7 @@ Component:
CmdDepends:
Depends:
Help:
Pre:
Pre: nss_compile.pre
Post:
Test: nss_compile.test
AuxFiles:

View File

@ -0,0 +1,13 @@
# #-- nss_compile.pre --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
. ../common.sh
if test "`hostname`" = "open.nlnetlabs.nl"; then
echo "on open, continue test"
else
skip_test "not on open, no test, do this explicitly"
fi
exit 0

View File

@ -4,13 +4,6 @@
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
if test "`hostname`" = "open.nlnetlabs.nl"; then
echo "on open, continue test"
else
echo "not on open, no test, do this explicitly"
exit 0
fi
. ../common.sh
get_make
PRE="../.."

View File

@ -7,7 +7,6 @@
# do your teardown here
. ../common.sh
PRE="../.."
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
kill_pid $DNSTAP_SOCKET_PID
kill_pid $FWD_PID
kill_pid `cat unbound2.pid`

View File

@ -6,7 +6,7 @@
PRE="../.."
. ../common.sh
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else skip_test "test skipped"; fi
get_random_port 5
UNBOUND_PORT=$RND_PORT

View File

@ -8,7 +8,6 @@ echo There we go...
PRE="../.."
. ../common.sh
if grep "define USE_DNSTAP 1" $PRE/config.h; then echo test enabled; else echo test skipped; exit 0; fi
echo "> query www.example.com. A"
dig @127.0.0.1 -p $UNBOUND_PORT www.example.com. | tee outfile

View File

@ -8,13 +8,6 @@
PRE="../.."
. ../common.sh
# if no python; exit
if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
echo "have pyunbound"
else
echo "no pyunbound"
exit 0
fi
# kill fwder
kill_pid $FWD_PID

View File

@ -10,8 +10,7 @@ PRE="../.."
if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
echo "have pyunbound"
else
echo "no pyunbound"
exit 0
skip_test "no pyunbound"
fi
# Copy the required libraries

View File

@ -5,13 +5,6 @@
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
if grep "define WITH_PYUNBOUND 1" $PRE/config.h; then
echo "have pyunbound"
else
echo "no pyunbound"
exit 0
fi
if test "`uname 2>&1`" = "Darwin"; then
echo export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:../../.libs"

View File

@ -8,13 +8,6 @@
PRE="../.."
. ../common.sh
# if no python; exit
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
fi
kill_pid $FWD_PID
kill_pid $UNBOUND_PID

View File

@ -10,8 +10,7 @@ PRE="../.."
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
skip_test "no python module"
fi
# get module python local
cp $PRE/pythonmod/unboundmodule.py .

View File

@ -5,12 +5,6 @@
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
fi
if test "`uname 2>&1`" = "Darwin"; then
ldnsdir=`grep ldnsdir= ../../Makefile | sed -e 's/ldnsdir=//'`

View File

@ -8,13 +8,6 @@
PRE="../.."
. ../common.sh
# if no python; exit
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
fi
kill_pid $FWD_PID
kill_pid $UNBOUND_PID

View File

@ -10,8 +10,7 @@ PRE="../.."
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
skip_test "no python module"
fi
# get module python local
cp $PRE/pythonmod/unboundmodule.py .

View File

@ -5,12 +5,6 @@
[ -f .tpkg.var.test ] && source .tpkg.var.test
PRE="../.."
if grep "define WITH_PYTHONMODULE 1" $PRE/config.h; then
echo "have python module"
else
echo "no python module"
exit 0
fi
if test "`uname 2>&1`" = "Darwin"; then
ldnsdir=`grep ldnsdir= ../../Makefile | sed -e 's/ldnsdir=//'`

View File

@ -8,7 +8,7 @@ Component:
CmdDepends:
Depends:
Help:
Pre:
Pre: root_anchor.pre
Post:
Test: root_anchor.test
AuxFiles:

View File

@ -0,0 +1,11 @@
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
# only do this test if the network is up.
if dig @k.root-servers.net . SOA 2>&1 | grep NOERROR ; then
:
else
skip_test "network is not up"
fi

View File

@ -5,15 +5,6 @@
PRE="../.."
# only do this test if the network is up.
echo "is the net up?"
if dig @k.root-servers.net . SOA 2>&1 | grep NOERROR ; then
echo yes
else
echo no
exit 0
fi
# test that unbound-anchor, its builtin DNSKEY, works.
# so the https is disabled (go to 127.0.0.1@10099).
$PRE/unbound-anchor -u "127.0.0.1" -P 10099 -a test.ds -v

View File

@ -8,7 +8,7 @@ Component:
CmdDepends:
Depends:
Help:
Pre:
Pre: root_hints.pre
Post:
Test: root_hints.test
AuxFiles:

11
testdata/root_hints.tdir/root_hints.pre vendored Normal file
View File

@ -0,0 +1,11 @@
# #-- root_hints.pre --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
# dig 9 ?
digv=`dig -v 2>&1 | wc -l`
if test $digv -ne 1; then
skip_test "Dig too old. skip test"
fi

View File

@ -1,4 +1,4 @@
# #-- 06-ianaports.test --#
# #-- root_hints.test --#
# source the master var file when it's there
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
# use .tpkg.var.test for in test variable passing
@ -6,13 +6,6 @@
PRE="../.."
# dig 9 ?
digv=`dig -v 2>&1 | wc -l`
if test $digv -ne 1; then
echo "Dig too old. skip test"
exit 0
fi
eval `grep ^srcdir= $PRE/Makefile`
echo "srcdir="$srcdir