Commit ebbe1997 authored by Michal Nowak's avatar Michal Nowak

Merge branch 'mnowak/1244-extra-quotes-around-TESTSOCK6/master' into 'master'

digdelv: Extra quotes prevent IPv6 runs

See merge request !2390
parents b7ed9396 1b6419f8
Pipeline #24498 passed with stages
in 1 minute and 55 seconds
......@@ -9,17 +9,14 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
if test -n "$PERL"
then
if $PERL -e "use IO::Socket::INET6;" 2> /dev/null
testsock6() {
if test -n "$PERL" && $PERL -e "use IO::Socket::INET6;" 2> /dev/null
then
TESTSOCK6="$PERL $TOP/bin/tests/system/testsock6.pl"
$PERL "$TOP/bin/tests/system/testsock6.pl" "$@"
else
TESTSOCK6=false
false
fi
else
TESTSOCK6=false
fi
}
export LANG=C
......@@ -491,6 +488,5 @@ export RRCHECKER
export SAMPLEUPDATE
export SIGNER
export SUBDIRS
export TESTSOCK6
export TSIGKEYGEN
export WIRETEST
......@@ -310,7 +310,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "checking dig @IPv6addr -4 A a.example ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null
if testsock6 fd92:7065:b8e:ffff::2 2>/dev/null
then
ret=0
dig_with_opts +tcp @fd92:7065:b8e:ffff::2 -4 A a.example > dig.out.test$n 2>&1 && ret=1
......@@ -323,7 +323,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "checking dig @IPv4addr -6 +mapped A a.example ($n)"
if "$TESTSOCK6" fd92:7065:b8e:ffff::2 2>/dev/null && [ "$(uname -s)" != "OpenBSD" ]
if testsock6 fd92:7065:b8e:ffff::2 2>/dev/null && [ "$(uname -s)" != "OpenBSD" ]
then
ret=0
dig_with_opts +tcp @10.53.0.2 -6 +mapped A a.example > dig.out.test$n 2>&1 || ret=1
......@@ -336,7 +336,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "checking dig +tcp @IPv4addr -6 +nomapped A a.example ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null
if testsock6 fd92:7065:b8e:ffff::2 2>/dev/null
then
ret=0
dig_with_opts +tcp @10.53.0.2 -6 +nomapped A a.example > dig.out.test$n 2>&1 || ret=1
......@@ -349,7 +349,7 @@ if [ -x "$DIG" ] ; then
n=$((n+1))
echo_i "checking dig +notcp @IPv4addr -6 +nomapped A a.example ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::2 2>/dev/null
if testsock6 fd92:7065:b8e:ffff::2 2>/dev/null
then
ret=0
dig_with_opts +notcp @10.53.0.2 -6 +nomapped A a.example > dig.out.test$n 2>&1 || ret=1
......@@ -860,7 +860,7 @@ if [ -x "$DELV" ] ; then
n=$((n+1))
echo_i "checking delv with IPv6 on IPv4 does not work ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::3 2>/dev/null
if testsock6 fd92:7065:b8e:ffff::3 2>/dev/null
then
ret=0
# following should fail because @IPv4 overrides earlier @IPv6 above
......@@ -878,7 +878,7 @@ if [ -x "$DELV" ] ; then
n=$((n+1))
echo_i "checking delv with IPv4 on IPv6 does not work ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::3 2>/dev/null
if testsock6 fd92:7065:b8e:ffff::3 2>/dev/null
then
ret=0
# following should fail because @IPv6 overrides earlier @IPv4 above
......
......@@ -166,7 +166,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::1
if testsock6 fd92:7065:b8e:ffff::1
then
ret=0
$DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::1 @fd92:7065:b8e:ffff::1 > dig.out.ns1.test$n || ret=1
......@@ -207,7 +207,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPv6 ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::1
if testsock6 fd92:7065:b8e:ffff::1
then
ret=0
$DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::1 @fd92:7065:b8e:ffff::1 > dig.out.ns1.test$n || ret=1
......@@ -340,7 +340,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 with break-dnssec ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::4
if testsock6 fd92:7065:b8e:ffff::4
then
ret=0
$DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::4 @fd92:7065:b8e:ffff::4 > dig.out.ns4.test$n || ret=1
......@@ -378,7 +378,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPv6, with break-dnssec ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::4
if testsock6 fd92:7065:b8e:ffff::4
then
ret=0
$DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::4 @fd92:7065:b8e:ffff::4 > dig.out.ns4.test$n || ret=1
......@@ -513,7 +513,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::2
if testsock6 fd92:7065:b8e:ffff::2
then
ret=0
$DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::2 @fd92:7065:b8e:ffff::2 > dig.out.ns2.test$n || ret=1
......@@ -557,7 +557,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, recursive, over IPv6 ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::2
if testsock6 fd92:7065:b8e:ffff::2
then
ret=0
$DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::2 @fd92:7065:b8e:ffff::2 > dig.out.ns2.test$n || ret=1
......@@ -690,7 +690,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive with break-dnssec ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
ret=0
$DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::3 @fd92:7065:b8e:ffff::3 > dig.out.ns3.test$n || ret=1
......@@ -729,7 +729,7 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPv6, recursive with break-dnssec ($n)"
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
ret=0
$DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::3 @fd92:7065:b8e:ffff::3 > dig.out.ns3.test$n || ret=1
......@@ -740,11 +740,12 @@ else
echo_i "skipped."
fi
$TESTSOCK6 fd92:7065:b8e:ffff::1 || {
echo_i "IPv6 address not configured; skipping IPv6 query tests"
echo_i "exit status: $status"
exit $status
}
if ! testsock6 fd92:7065:b8e:ffff::1
then
echo_i "IPv6 address not configured; skipping IPv6 query tests"
echo_i "exit status: $status"
exit $status
fi
# Reconfiguring for IPv6 tests
echo_i "reconfiguring servers"
......
......@@ -55,7 +55,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking Country database by code using IPv6 ($n)"
......@@ -94,7 +94,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking Country database with nested ACLs using IPv6 ($n)"
......@@ -133,7 +133,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking Country database by name using IPv6 ($n)"
......@@ -173,7 +173,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking Country database by continent code using IPv6 ($n)"
......@@ -214,7 +214,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking City database by region code using IPv6 ($n)"
......@@ -255,7 +255,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking City database by city name using IPv6 ($n)"
......@@ -294,7 +294,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking ISP database using IPv6 ($n)"
......@@ -333,7 +333,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking ASN database by org name using IPv6 ($n)"
......@@ -372,7 +372,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking ASN database, ASNNNN only, using IPv6 ($n)"
......@@ -411,7 +411,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking ASN database, NNNN only, using IPv6 ($n)"
......@@ -450,7 +450,7 @@ done
[ $ret -eq 0 ] || echo_i "failed"
status=`expr $status + $ret`
if $TESTSOCK6 fd92:7065:b8e:ffff::3
if testsock6 fd92:7065:b8e:ffff::3
then
n=`expr $n + 1`
echo_i "checking Domain database using IPv6 ($n)"
......
......@@ -160,7 +160,7 @@ n=`expr $n + 1`
# Note: for a short term workaround we use ::1, assuming it's configured and
# usable for our tests. We should eventually use the test ULA and available
# checks introduced in change 2916.
if $TESTSOCK6 ../testsock6.pl ::1 2> /dev/null
if testsock6 ::1
then
echo_i "checking IPv6 static-stub address ($n)"
ret=0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment