aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/testcode
diff options
context:
space:
mode:
Diffstat (limited to 'external/unbound/testcode')
-rw-r--r--external/unbound/testcode/asynclook.c2
-rw-r--r--external/unbound/testcode/delayer.c2
-rwxr-xr-xexternal/unbound/testcode/do-tests.sh2
-rw-r--r--external/unbound/testcode/fake_event.c6
-rw-r--r--external/unbound/testcode/perf.c6
-rw-r--r--external/unbound/testcode/pktview.c4
-rw-r--r--external/unbound/testcode/readhex.c4
-rw-r--r--external/unbound/testcode/replay.c2
-rw-r--r--external/unbound/testcode/streamtcp.c6
-rwxr-xr-xexternal/unbound/testcode/testbed.sh133
-rw-r--r--external/unbound/testcode/testbed.txt38
-rw-r--r--external/unbound/testcode/testbound.c2
-rw-r--r--external/unbound/testcode/testpkts.c10
-rw-r--r--external/unbound/testcode/unitanchor.c4
-rw-r--r--external/unbound/testcode/unitdname.c4
-rw-r--r--external/unbound/testcode/unitldns.c6
-rw-r--r--external/unbound/testcode/unitmain.c4
-rw-r--r--external/unbound/testcode/unitmsgparse.c6
-rw-r--r--external/unbound/testcode/unitneg.c2
-rw-r--r--external/unbound/testcode/unitverify.c8
20 files changed, 40 insertions, 211 deletions
diff --git a/external/unbound/testcode/asynclook.c b/external/unbound/testcode/asynclook.c
index 7e9ee7758..534489735 100644
--- a/external/unbound/testcode/asynclook.c
+++ b/external/unbound/testcode/asynclook.c
@@ -48,7 +48,7 @@
#include "libunbound/context.h"
#include "util/locks.h"
#include "util/log.h"
-#include "ldns/rrdef.h"
+#include "sldns/rrdef.h"
#ifdef UNBOUND_ALLOC_LITE
#undef malloc
#undef calloc
diff --git a/external/unbound/testcode/delayer.c b/external/unbound/testcode/delayer.c
index 7a90fc04c..050cbd23e 100644
--- a/external/unbound/testcode/delayer.c
+++ b/external/unbound/testcode/delayer.c
@@ -50,7 +50,7 @@
#include <sys/time.h>
#include "util/net_help.h"
#include "util/config_file.h"
-#include "ldns/sbuffer.h"
+#include "sldns/sbuffer.h"
#include <signal.h>
/** number of reads per select for delayer */
diff --git a/external/unbound/testcode/do-tests.sh b/external/unbound/testcode/do-tests.sh
index 84d2ef566..6ea12cd2f 100755
--- a/external/unbound/testcode/do-tests.sh
+++ b/external/unbound/testcode/do-tests.sh
@@ -14,7 +14,7 @@ NEED_NOMINGW='tcp_sigpipe.tpkg 07-confroot.tpkg 08-host-lib.tpkg fwd_ancil.tpkg'
test_tool_avail "dig"
test_tool_avail "ldns-testns"
-# test for ipv6, uses streamptcp peculiarity.
+# test for ipv6, uses streamtcp peculiarity.
if ./streamtcp -f ::1 2>&1 | grep "not supported" >/dev/null 2>&1; then
HAVE_IPV6=no
else
diff --git a/external/unbound/testcode/fake_event.c b/external/unbound/testcode/fake_event.c
index de453aaa2..4335a8f22 100644
--- a/external/unbound/testcode/fake_event.c
+++ b/external/unbound/testcode/fake_event.c
@@ -60,9 +60,9 @@
#include "testcode/testpkts.h"
#include "util/log.h"
#include "util/fptr_wlist.h"
-#include "ldns/sbuffer.h"
-#include "ldns/wire2str.h"
-#include "ldns/str2wire.h"
+#include "sldns/sbuffer.h"
+#include "sldns/wire2str.h"
+#include "sldns/str2wire.h"
#include <signal.h>
struct worker;
struct daemon_remote;
diff --git a/external/unbound/testcode/perf.c b/external/unbound/testcode/perf.c
index c51eee4b1..320cbc933 100644
--- a/external/unbound/testcode/perf.c
+++ b/external/unbound/testcode/perf.c
@@ -50,9 +50,9 @@
#include "util/data/msgencode.h"
#include "util/data/msgreply.h"
#include "util/data/msgparse.h"
-#include "ldns/sbuffer.h"
-#include "ldns/wire2str.h"
-#include "ldns/str2wire.h"
+#include "sldns/sbuffer.h"
+#include "sldns/wire2str.h"
+#include "sldns/str2wire.h"
#include <sys/time.h>
/** usage information for perf */
diff --git a/external/unbound/testcode/pktview.c b/external/unbound/testcode/pktview.c
index e59283fa8..12e0d8edb 100644
--- a/external/unbound/testcode/pktview.c
+++ b/external/unbound/testcode/pktview.c
@@ -45,8 +45,8 @@
#include "util/data/msgparse.h"
#include "testcode/unitmain.h"
#include "testcode/readhex.h"
-#include "ldns/sbuffer.h"
-#include "ldns/parseutil.h"
+#include "sldns/sbuffer.h"
+#include "sldns/parseutil.h"
/** usage information for pktview */
static void usage(char* argv[])
diff --git a/external/unbound/testcode/readhex.c b/external/unbound/testcode/readhex.c
index d9aba09b7..e871def0e 100644
--- a/external/unbound/testcode/readhex.c
+++ b/external/unbound/testcode/readhex.c
@@ -41,8 +41,8 @@
#include <ctype.h>
#include "testcode/readhex.h"
#include "util/log.h"
-#include "ldns/sbuffer.h"
-#include "ldns/parseutil.h"
+#include "sldns/sbuffer.h"
+#include "sldns/parseutil.h"
/** skip whitespace */
static void
diff --git a/external/unbound/testcode/replay.c b/external/unbound/testcode/replay.c
index 5c1197146..01b17a7f7 100644
--- a/external/unbound/testcode/replay.c
+++ b/external/unbound/testcode/replay.c
@@ -50,7 +50,7 @@
#include "testcode/replay.h"
#include "testcode/testpkts.h"
#include "testcode/fake_event.h"
-#include "ldns/str2wire.h"
+#include "sldns/str2wire.h"
/** max length of lines in file */
#define MAX_LINE_LEN 10240
diff --git a/external/unbound/testcode/streamtcp.c b/external/unbound/testcode/streamtcp.c
index d93ab966d..c5919428a 100644
--- a/external/unbound/testcode/streamtcp.c
+++ b/external/unbound/testcode/streamtcp.c
@@ -51,9 +51,9 @@
#include "util/data/msgparse.h"
#include "util/data/msgreply.h"
#include "util/data/dname.h"
-#include "ldns/sbuffer.h"
-#include "ldns/str2wire.h"
-#include "ldns/wire2str.h"
+#include "sldns/sbuffer.h"
+#include "sldns/str2wire.h"
+#include "sldns/wire2str.h"
#include <openssl/ssl.h>
#include <openssl/rand.h>
#include <openssl/err.h>
diff --git a/external/unbound/testcode/testbed.sh b/external/unbound/testcode/testbed.sh
deleted file mode 100755
index 62ce2059b..000000000
--- a/external/unbound/testcode/testbed.sh
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env bash
-# Testbed for NSD.
-# By Wouter Wijngaards, NLnet Labs, 2006.
-# BSD License.
-
-# this version prefers gmake if available.
-# adds variable LDNS for the LDNS path to use.
-
-# global settings
-CONFIGURE_FLAGS=""
-REPORT_FILE=testdata/testbed.report
-LOG_FILE=testdata/testbed.log
-HOST_FILE=testdata/host_file.$USER
-
-if test ! -f $HOST_FILE; then
- echo "No such file: $HOST_FILE"
- exit 1
-fi
-
-function echossh() # like ssh but echos.
-{
- echo "> ssh $*"
- ssh $*
-}
-
-# Compile and run NSD on platforms
-function dotest()
-# parameters: <host> <dir>
-# host is name of ssh host
-# dir is directory of nsd trunk on host
-{
- echo "$1 begin on "`date` | tee -a $REPORT_FILE
-
- DISABLE=""
- if test $IP6 = no; then
- DISABLE="--disable-ipv6"
- fi
- if test x$LDNS != x; then
- DISABLE="--with-ldns=$LDNS $DISABLE"
- fi
- if test x$LIBEVENT != x; then
- DISABLE="--with-libevent=$LIBEVENT $DISABLE"
- fi
-
- cat >makeconf.mak.$$ << EOF
-#configure: configure.ac
-# $AC_CMD
-# touch configure
-Makefile: Makefile.in #configure
- ./configure $CONFIGURE_FLAGS $DISABLE
- touch Makefile
-EOF
- scp makeconf.mak.$$ $1:$2
- # determine make to use
- tempx=`ssh $1 "cd $2; which gmake"`
- MAKE_CMD=`ssh $1 "cd $2; if test -f '$tempx'; then echo $tempx; else echo $MAKE_CMD; fi"`
-
- if test $SVN = yes; then
- echossh $1 "cd $2; svn up"
- echossh $1 "cd $2; $MAKE_CMD -f makeconf.mak.$$ configure"
- else
- # svn and autoconf locally
- echo "fake svn via svnexport, tar, autoconf, bison, flex."
- svn export svn+ssh://open.nlnetlabs.nl/svn/nsd/trunk unbound_ttt
- (cd unbound_ttt; $AC_CMD; rm -r autom4te* .c-mode-rc.el .cvsignore)
- if test $FIXCONFIGURE = yes; then
- echo fixing up configure length test.
- (cd unbound_ttt; mv configure oldconf; sed -e 's?while (test "X"?lt_cv_sys_max_cmd_len=65500; echo skip || while (test "X"?' <oldconf >configure; chmod +x ./configure)
- fi
- du unbound_ttt
- rsync -vrcpz --rsync-path=/home/wouter/bin/rsync unbound_ttt $1:unbound_ttt
- # tar czf unbound_ttt.tgz unbound_ttt
- rm -rf unbound_ttt
- # ls -al unbound_ttt.tgz
- # scp unbound_ttt.tgz $1:unbound_ttt.tar.gz
- # rm unbound_ttt.tgz
- # echossh $1 "gtar xzf unbound_ttt.tar.gz && rm unbound_ttt.tar.gz"
- fi
- echossh $1 "cd $2; $MAKE_CMD -f makeconf.mak.$$ Makefile"
- echossh $1 "cd $2; $MAKE_CMD all tests"
- echossh $1 "cd $2; $MAKE_CMD doc"
- if test $RUN_TEST = yes; then
- echossh $1 "cd $2; bash testcode/do-tests.sh"
- echossh $1 "cd $2/testdata; sh ../testcode/mini_tpkg.sh -q report" | tee -a $REPORT_FILE
- fi
- echossh $1 "cd $2; rm -f makeconf.mak.$$"
- rm -f makeconf.mak.$$
- echo "$1 end on "`date` | tee -a $REPORT_FILE
-}
-
-echo "on "`date`" by $USER." > $REPORT_FILE
-echo "on "`date`" by $USER." > $LOG_FILE
-
-# read host names
-declare -a hostname desc dir vars
-IFS=' '
-i=0
-while read a b c d; do
- if echo $a | grep "^#" >/dev/null; then
- continue # skip it
- fi
- # append after arrays
- hostname[$i]=$a
- desc[$i]=$b
- dir[$i]=$c
- vars[$i]=$d
- i=$(($i+1))
-done <$HOST_FILE
-echo "testing on $i hosts"
-
-# do the test
-for((i=0; i<${#hostname[*]}; i=$i+1)); do
- if echo ${hostname[$i]} | grep "^#" >/dev/null; then
- continue # skip it
- fi
- # echo "hostname=[${hostname[$i]}]"
- # echo "desc=[${desc[$i]}]"
- # echo "dir=[${dir[$i]}]"
- # echo "vars=[${vars[$i]}]"
- AC_CMD="libtoolize -c --force; autoconf && autoheader"
- MAKE_CMD="make"
- SVN=yes
- IP6=yes
- FIXCONFIGURE=no
- RUN_TEST=yes
- LDNS=
- LIBEVENT=
- eval ${vars[$i]}
- echo "*** ${hostname[$i]} ${desc[$i]} ***" | tee -a $LOG_FILE | tee -a $REPORT_FILE
- dotest ${hostname[$i]} ${dir[$i]} 2>&1 | tee -a $LOG_FILE
-done
-
-echo "done"
diff --git a/external/unbound/testcode/testbed.txt b/external/unbound/testcode/testbed.txt
deleted file mode 100644
index b0175049e..000000000
--- a/external/unbound/testcode/testbed.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-Testbed.sh help page.
-
-Testbed helps in running the test packages (using tpkg(1)) on several systems.
-The script is specially written for unbound (edit it to change to different
-software). It is licensed BSD.
-
-The hosts to run on are listed in host_file.<username>. You need to have
-public-key authorized ssh access to these systems (or type your password lots
-and lots of times). The host_file describes the directories and environment
-of each host. You need only user-level access to the host.
-
-The host_file is very restrictive in formatting. Comments are lines starting
-with the # mark. The entries must be separated by tabs. Please list the
-hostname<tab>description<tab>checkoutdir<tab>variables
-
-hostname: network hostname to ssh to.
-desc: pretty text to describe the machine architecture.
-checkoutdir: directory on the remote host where a svn checkout is present.
-variables: zero or more variables separated by spaces. BLA=value BAR=val.
-
-Only important variable for unbound is the LDNS=<dir> variable that if present
-forces --with-ldns=<dir> to be passed to ./configure. In case LDNS is not
-installed on the system itself, but present somewhere else.
-
-You can also set LIBEVENT=<dir> for the libevent directory, if it is
-installed in a nonstandard location.
-
-*** Running the testbed
-
-Run by executing the script. It will take all the hosts from the file in
-turn and update the svn directory there, possible autoreconf if necessary,
-possibly ./configure <args> if necessary, make the executables.
-Then it will run the testcode/do-tests script. This script should execute
-the tests that this host is capable of running.
-
-in testdata/testbed.log has a line-by-line log. See your make errors here.
-in testdata/testbed.report has only the tpkg reports. Summary.
-
diff --git a/external/unbound/testcode/testbound.c b/external/unbound/testcode/testbound.c
index daf8ddd41..fa361c4ea 100644
--- a/external/unbound/testcode/testbound.c
+++ b/external/unbound/testcode/testbound.c
@@ -47,7 +47,7 @@
#include "testcode/fake_event.h"
#include "daemon/remote.h"
#include "util/config_file.h"
-#include "ldns/keyraw.h"
+#include "sldns/keyraw.h"
#include <ctype.h>
/** signal that this is a testbound compile */
diff --git a/external/unbound/testcode/testpkts.c b/external/unbound/testcode/testpkts.c
index a494d9f01..d1960a410 100644
--- a/external/unbound/testcode/testpkts.c
+++ b/external/unbound/testcode/testpkts.c
@@ -27,11 +27,11 @@ struct sockaddr_storage;
#include <ctype.h>
#include "testcode/testpkts.h"
#include "util/net_help.h"
-#include "ldns/sbuffer.h"
-#include "ldns/rrdef.h"
-#include "ldns/pkthdr.h"
-#include "ldns/str2wire.h"
-#include "ldns/wire2str.h"
+#include "sldns/sbuffer.h"
+#include "sldns/rrdef.h"
+#include "sldns/pkthdr.h"
+#include "sldns/str2wire.h"
+#include "sldns/wire2str.h"
/** max size of a packet */
#define MAX_PACKETLEN 65536
diff --git a/external/unbound/testcode/unitanchor.c b/external/unbound/testcode/unitanchor.c
index 8047eb2bf..8819c5ab6 100644
--- a/external/unbound/testcode/unitanchor.c
+++ b/external/unbound/testcode/unitanchor.c
@@ -43,8 +43,8 @@
#include "util/data/dname.h"
#include "testcode/unitmain.h"
#include "validator/val_anchor.h"
-#include "ldns/sbuffer.h"
-#include "ldns/rrdef.h"
+#include "sldns/sbuffer.h"
+#include "sldns/rrdef.h"
/** test empty set */
static void
diff --git a/external/unbound/testcode/unitdname.c b/external/unbound/testcode/unitdname.c
index 83d829fae..238c3edf7 100644
--- a/external/unbound/testcode/unitdname.c
+++ b/external/unbound/testcode/unitdname.c
@@ -42,8 +42,8 @@
#include "util/log.h"
#include "testcode/unitmain.h"
#include "util/data/dname.h"
-#include "ldns/sbuffer.h"
-#include "ldns/str2wire.h"
+#include "sldns/sbuffer.h"
+#include "sldns/str2wire.h"
/** put dname into buffer */
static sldns_buffer*
diff --git a/external/unbound/testcode/unitldns.c b/external/unbound/testcode/unitldns.c
index 65170a825..e27e46eaa 100644
--- a/external/unbound/testcode/unitldns.c
+++ b/external/unbound/testcode/unitldns.c
@@ -41,9 +41,9 @@
#include "config.h"
#include "util/log.h"
#include "testcode/unitmain.h"
-#include "ldns/sbuffer.h"
-#include "ldns/str2wire.h"
-#include "ldns/wire2str.h"
+#include "sldns/sbuffer.h"
+#include "sldns/str2wire.h"
+#include "sldns/wire2str.h"
/** verbose this unit test */
static int vbmp = 0;
diff --git a/external/unbound/testcode/unitmain.c b/external/unbound/testcode/unitmain.c
index 4673214ad..09ebba329 100644
--- a/external/unbound/testcode/unitmain.c
+++ b/external/unbound/testcode/unitmain.c
@@ -61,8 +61,8 @@
#include "nss.h"
#endif
-#include "ldns/rrdef.h"
-#include "ldns/keyraw.h"
+#include "sldns/rrdef.h"
+#include "sldns/keyraw.h"
#include "util/log.h"
#include "testcode/unitmain.h"
diff --git a/external/unbound/testcode/unitmsgparse.c b/external/unbound/testcode/unitmsgparse.c
index b33a2408d..ba4e234c8 100644
--- a/external/unbound/testcode/unitmsgparse.c
+++ b/external/unbound/testcode/unitmsgparse.c
@@ -51,9 +51,9 @@
#include "util/net_help.h"
#include "testcode/readhex.h"
#include "testcode/testpkts.h"
-#include "ldns/sbuffer.h"
-#include "ldns/str2wire.h"
-#include "ldns/wire2str.h"
+#include "sldns/sbuffer.h"
+#include "sldns/str2wire.h"
+#include "sldns/wire2str.h"
/** verbose message parse unit test */
static int vbmp = 0;
diff --git a/external/unbound/testcode/unitneg.c b/external/unbound/testcode/unitneg.c
index d39684095..36fa6b906 100644
--- a/external/unbound/testcode/unitneg.c
+++ b/external/unbound/testcode/unitneg.c
@@ -45,7 +45,7 @@
#include "util/data/dname.h"
#include "testcode/unitmain.h"
#include "validator/val_neg.h"
-#include "ldns/rrdef.h"
+#include "sldns/rrdef.h"
/** verbose unit test for negative cache */
static int negverbose = 0;
diff --git a/external/unbound/testcode/unitverify.c b/external/unbound/testcode/unitverify.c
index 2074f3c4e..078af0a9c 100644
--- a/external/unbound/testcode/unitverify.c
+++ b/external/unbound/testcode/unitverify.c
@@ -56,10 +56,10 @@
#include "util/net_help.h"
#include "util/module.h"
#include "util/config_file.h"
-#include "ldns/sbuffer.h"
-#include "ldns/keyraw.h"
-#include "ldns/str2wire.h"
-#include "ldns/wire2str.h"
+#include "sldns/sbuffer.h"
+#include "sldns/keyraw.h"
+#include "sldns/str2wire.h"
+#include "sldns/wire2str.h"
/** verbose signature test */
static int vsig = 0;