summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 10:23:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 10:23:11 +0000
commit52deadae9ec98d0968d87d11a93259d8ab08c455 (patch)
treea5c1139e40948c4dd80750ba724e9fe03cf05f88
parentReleasing progress-linux version 3.0.0-2~dschinn1. (diff)
downloadknot-resolver-52deadae9ec98d0968d87d11a93259d8ab08c455.zip
knot-resolver-52deadae9ec98d0968d87d11a93259d8ab08c455.tar.xz
Merging debian version 3.0.0-3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/changelog8
-rw-r--r--debian/control3
-rwxr-xr-xdebian/rules3
-rw-r--r--debian/tests/control2
-rwxr-xr-xdebian/tests/roundtrip31
5 files changed, 30 insertions, 17 deletions
diff --git a/debian/changelog b/debian/changelog
index a7b8996..13229bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+knot-resolver (3.0.0-3) unstable; urgency=medium
+
+ * improve autopkgtest
+ * autopkgtest: env vars can select which kdig and kresd to test
+ * run roundtrip test at compile time too
+
+ -- Daniel Kahn Gillmor <dkg@fifthhorseman.net> Fri, 31 Aug 2018 11:36:17 -0400
+
knot-resolver (3.0.0-2~dschinn1) dschinn-backports; urgency=medium
* Uploading to dschinn-backports, remaining changes:
diff --git a/debian/control b/debian/control
index 9ec6fe7..67cec2f 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,8 @@ Build-Depends-Indep:
Build-Depends:
debhelper (>= 11~),
dns-root-data,
+ gnutls-bin <!nocheck>,
+ knot-dnsutils <!nocheck>,
libcmocka-dev (>= 1.0.0),
libedit-dev,
libgeoip-dev,
@@ -27,6 +29,7 @@ Build-Depends:
libuv1-dev,
luajit,
pkg-config,
+ socat <!nocheck>,
Standards-Version: 4.2.1
Homepage: https://www.knot-resolver.cz/
Vcs-Browser: https://sources.progress-linux.org/distributions/dschinn-backports/packages/knot-resolver
diff --git a/debian/rules b/debian/rules
index 758f30c..4becfc7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,6 +59,9 @@ override_dh_auto_test-indep:
override_dh_auto_test-arch:
ifeq ($(RUN_TESTS),yes)
dh_auto_test -- V=1
+ifeq (, $(filter nocheck, $(DEB_BUILD_OPTIONS)))
+ LD_LIBRARY_PATH=$(CURDIR)/lib KRESD=$(CURDIR)/daemon/kresd debian/tests/roundtrip
+endif
endif
override_dh_missing:
diff --git a/debian/tests/control b/debian/tests/control
index 0975e8c..5eec04b 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -2,4 +2,4 @@ Test-Command: make installcheck
Depends: @, @builddeps@
Tests: roundtrip
-Depends: knot-dnsutils, knot-resolver, socat, systemd
+Depends: gnutls-bin, knot-dnsutils, knot-resolver, socat
diff --git a/debian/tests/roundtrip b/debian/tests/roundtrip
index 75b9c43..c1af873 100755
--- a/debian/tests/roundtrip
+++ b/debian/tests/roundtrip
@@ -16,8 +16,10 @@ else
d="$AUTOPKGTEST_ARTIFACTS"
fi
ip="${TESTIP:-127.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).$(( $RANDOM % 256 ))}"
+kresd="${KRESD:-/usr/sbin/kresd}"
+kdig="${KDIG:-$(which kdig)}"
-printf "kresd + kdig roundtrip tests\n------------\n workdir: %s\n IP addr: %s\n" "$d" "$ip"
+printf "%s + %s roundtrip tests\n------------\n workdir: %s\n IP addr: %s\n" "$kresd" "$kdig" "$d" "$ip"
section() {
printf "\n%s\n" "$1"
@@ -28,7 +30,7 @@ cleanup () {
section "cleaning up"
find "$d" -ls
tail "$d"/*.err
- echo 'quit()' | socat STDIO UNIX:"$d/control"
+ echo 'quit()' | socat STDIO "UNIX-CONNECT:$(echo "$d/tty/"*)"
if [ "$remove" ]; then
printf "cleaning up working directory %s\n" "$remove"
rm -rf "$remove"
@@ -64,41 +66,38 @@ certtool --stdout-info --generate-privkey --outfile "$d/ee-key.pem"
certtool --stdout-info --pubkey-info --load-privkey "$d/ee-key.pem" --outfile "$d/ee-pubkey.pem"
certtool --stdout-info --generate-certificate --load-ca-privkey "$d/ca-key.pem" --load-ca-certificate "$d/ca-cert.pem" --template "$d/ee.template" --load-pubkey "$d/ee-pubkey.pem" --outfile "$d/ee-cert.pem"
-section "set up kresd daemon on $ip:8853"
+section "set up kresd daemon on $ip on ports 8053 (UDP, TCP) and 8853 (TLS)"
cat > "$d/kresd.conf" <<EOF
modules = { 'hints > iterate' }
net.tls("$d/ee-cert.pem", "$d/ee-key.pem")
hints["monkeys.example"] = "127.15.23.5"
EOF
-# FIXME: we have no UDP listener because of limitations of
-# systemd-socket-activate:
-# https://github.com/systemd/systemd/issues/9983
-systemd-socket-activate -l "$ip:8853" -l "$d/control" -l "$ip:8053" --fdname=tls:control:dns /usr/sbin/kresd -c "$d/kresd.conf" "$d" 2> "$d/kresd.err" &
+"$kresd" --addr="$ip@8053" --tls="$ip@8853" --forks=1 --config="$d/kresd.conf" --quiet "$d" 2> "$d/kresd.err" &
sleep 1
-# section "test UDP with kdig"
-# x=$(kdig +short @"$ip:8053" monkeys.example)
-# [ "$x" = "127.15.23.5" ]
-# echo "successful UDP request to $ip on port 8053"
+section "test UDP with kdig"
+x=$("$kdig" +short @"$ip:8053" monkeys.example)
+[ "$x" = "127.15.23.5" ]
+echo "successful UDP request to $ip on port 8053"
section "test TCP with kdig"
-x=$(kdig +short +tcp @"$ip:8053" monkeys.example)
+x=$("$kdig" +short +tcp @"$ip:8053" monkeys.example)
[ "$x" = "127.15.23.5" ]
echo "successful TCP request to $ip on port 8053"
section "test opportunistic DNS-over-TLS with kdig"
-x=$(kdig +short +tls @"$ip:8853" monkeys.example)
+x=$("$kdig" +short +tls @"$ip:8853" monkeys.example)
[ "$x" = "127.15.23.5" ]
echo "successful opportunistic DNS-over-TLS request to $ip on port 8853"
section "test strict DNS-over-TLS with kdig"
-x=$(kdig +short +tls +tls-ca="$d/ca-cert.pem" +tls-hostname=test.example @"$ip:8853" monkeys.example)
+x=$("$kdig" +short +tls +tls-ca="$d/ca-cert.pem" +tls-hostname=test.example @"$ip:8853" monkeys.example)
[ "$x" = "127.15.23.5" ]
echo "successful strict DNS-over-TLS request to $ip on port 8853"
section "test invalid name with strict DNS-over-TLS with kdig"
-x=$(kdig +tls +tls-ca="$d/ca-cert.pem" +tls-hostname=notright.example @"$ip:8853" monkeys.example) 2>&1
+x=$("$kdig" +tls +tls-ca="$d/ca-cert.pem" +tls-hostname=notright.example @"$ip:8853" monkeys.example 2>"$d/badname.err")
if [ "$x" ]; then
printf >&2 "got: %s\nShould not have succeeded since name did not match!" "$x"
false
@@ -106,7 +105,7 @@ fi
echo "successful strict DNS-over-TLS request failure when name mismatch to $ip on port 8853"
section "test bad authority with strict DNS-over-TLS with kdig"
-x=$(kdig +tls-ca="$d/bogus-cert.pem" +tls-hostname=test.example @"$ip:8853" monkeys.example) 2>&1
+x=$("$kdig" +tls-ca="$d/bogus-cert.pem" +tls-hostname=test.example @"$ip:8853" monkeys.example 2>"$d/badca.err")
if [ "$x" ]; then
printf >&2 "got: %s\nShould not have succeeded since authority was wrong!" "$x"
false