(cd ../ns2 && $SHELL keygen.sh )
-cat $infile ../ns2/dsset-example$TP > $zonefile
+cat $infile ../ns2/dsset-example. > $zonefile
zskact=`$KEYGEN -3 -a RSASHA1 -q $zone`
zskvanish=`$KEYGEN -3 -a RSASHA1 -q $zone`
for subdomain in secure nsec3 autonsec3 optout rsasha256 rsasha512 nsec3-to-nsec oldsigs sync \
dname-at-apex-nsec3
do
- cp ../ns3/dsset-$subdomain.example$TP .
+ cp ../ns3/dsset-$subdomain.example. .
done
# Create keys and pass the DS to the parent.
zone=example
zonefile="${zone}.db"
infile="${zonefile}.in"
-cat $infile dsset-*.example$TP > $zonefile
+cat $infile dsset-*.example. > $zonefile
kskname=`$KEYGEN -a RSASHA1 -3 -q -fk $zone`
$KEYGEN -a RSASHA1 -3 -q $zone > /dev/null
-$DSFROMKEY $kskname.key > dsset-${zone}$TP
+$DSFROMKEY $kskname.key > dsset-${zone}.
# Create keys for a private secure zone.
zone=private.secure.example
cp $i `echo $i | sed s/X/K/`
done
$KEYGEN -a RSASHA1 -q $zone > /dev/null
-$DSFROMKEY Kbar.+005+30804.key > dsset-bar$TP
+$DSFROMKEY Kbar.+005+30804.key > dsset-bar.
cp $infile $zonefile
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# NSEC3/NSEC test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# NSEC3/NSEC3 test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# Jitter/NSEC3 test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A nsec3 zone (non-optout).
#
setup nsec3.example
-cat $infile dsset-*.${zone}$TP > $zonefile
+cat $infile dsset-*.${zone}. > $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# An NSEC3 zone, with NSEC3 parameters set prior to signing
echo $ksk > ../autoksk.key
zsk=`$KEYGEN -G -q -a $DEFAULT_ALGORITHM -3 $zone 2> kg.out` || dumpit kg.out
echo $zsk > ../autozsk.key
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# OPTOUT/NSEC test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# OPTOUT/NSEC3 test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# OPTOUT/OPTOUT test zone
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A optout nsec3 zone.
#
setup optout.example
-cat $infile dsset-*.${zone}$TP > $zonefile
+cat $infile dsset-*.${zone}. > $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A RSASHA256 zone.
cp $infile $zonefile
ksk=`$KEYGEN -q -a RSASHA256 -b 2048 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a RSASHA256 -b 1024 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A RSASHA512 zone.
cp $infile $zonefile
ksk=`$KEYGEN -q -a RSASHA512 -b 2048 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a RSASHA512 -b 1024 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# NSEC-only zone.
cp $infile $zonefile
ksk=`$KEYGEN -q -a RSASHA1 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a RSASHA1 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# Signature refresh test zone. Signatures are set to expire long
cp $infile $zonefile
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk -P sync now $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
echo ns3/$ksk > ../sync.key
#
cp $infile $zonefile
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk -P sync now $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A zone that has a published inactive key that is autosigned.
cp $infile $zonefile
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -Pnow -A now+3600 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A zone that has a published inactive key that is autosigned.
cp $infile $zonefile
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -P now -A now+3600 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A zone that starts with a active KSK + ZSK and a inactive ZSK.
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -P now -A now+3600 -fk $zone > kg.out 2>&1 || dumpit kg.out
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A zone that starts with a active KSK + ZSK and a inactive ZSK.
ksk=`$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q $zone > kg.out 2>&1 || dumpit kg.out
$KEYGEN -a $DEFAULT_ALGORITHM -3 -q -P now -A now+3600 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
#
# A zone that starts with an active KSK + ZSK and an inactive ZSK, with the
cp $infile $zonefile
ksk=`$KEYGEN -q -a $DEFAULT_ALGORITHM -3 -fk $zone 2> kg.out` || dumpit kg.out
$KEYGEN -q -a $DEFAULT_ALGORITHM -3 $zone > kg.out 2>&1 || dumpit kg.out
-$DSFROMKEY $ksk.key > dsset-${zone}$TP
+$DSFROMKEY $ksk.key > dsset-${zone}.
}
check_stdout() {
- $DIFF out.$n "${out:-empty}" >/dev/null && return
+ diff out.$n "${out:-empty}" >/dev/null && return
echo_d "stdout did not match '$out'"
( echo "wanted"
cat "$out"
testcase 0 $PERL checkmtime.pl 7200 DS.inplace.bak
name='in-place correct output'
-testcase 0 $DIFF DS.1 DS.inplace
+testcase 0 diff DS.1 DS.inplace
name='in-place backup unmodified'
-testcase 0 $DIFF DS.1 DS.inplace.bak
+testcase 0 diff DS.1 DS.inplace.bak
name='one mangled DS'
err='found RRSIG by key'
dswithdrawn missing-dswithdrawn bad-dswithdrawn \
multiple-dswithdrawn incomplete-dswithdrawn bad2-dswithdrawn
do
- cp "../ns9/dsset-$subdomain.checkds$TP" .
+ cp "../ns9/dsset-$subdomain.checkds." .
done
zone="checkds"
ret=0
# Step 3: Ensure that output conversion from stdin is the same as the output conversion from a file.
-$DIFF zones/zone1_file.txt zones/zone1_stdin.txt >/dev/null 2>&1 || ret=1
+diff zones/zone1_file.txt zones/zone1_stdin.txt >/dev/null 2>&1 || ret=1
status=`expr $status + $ret`
if [ $ret != 0 ]; then echo_i "failed"; fi
export BIGKEY
export CDS
export CHECKZONE
-export CYGWIN
export DESCRIPTION
export DIG
export FEATURETEST
export NZD2NZF
export PERL
export PIPEQUERIES
-export PSSUSPEND
export PYTHON
export RESOLVE
export RNDC
# Provide TMPDIR variable for tests that need it.
TMPDIR=${TMPDIR:-/tmp}
-# This is not the windows build.
-CYGWIN=""
-
# Load common values
. $TOP_SRCDIR/bin/tests/system/conf.sh.common
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
-
-# Things that are different on Windows
-KILL=kill
-DIFF=diff
-DOS2UNIX=true
-# There's no trailing period on Windows
-TP=.
-
# Use the CONFIG_SHELL detected by configure for tests
SHELL=@SHELL@
# PERL will be an empty string if no perl interpreter was found.
PERL=$(command -v "@PERL@")
-# Windows process management leave empty
-PSSUSPEND=
-
PYTHON=$(command -v "@PYTHON@" || true)
PYTEST=@PYTEST@
getcookie() {
awk '$2 == "COOKIE:" {
print $3;
- }' < $1 | tr -d '\r'
+ }' < $1
}
fullcookie() {
ret=0
dig_with_opts @10.53.0.3 +ednsopt=llq:0001000200001234567812345678fefefefe +qr a.example > dig.out.test$n 2>&1 || ret=1
pat='LLQ: Version: 1, Opcode: 2, Error: 0, Identifier: 1311768465173141112, Lifetime: 4278124286$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
# First defined EDE code, additional text "foo".
dig_with_opts @10.53.0.3 +ednsopt=ede:0000666f6f a.example +qr > dig.out.test$n 2>&1 || ret=1
pat='^; EDE: 0 (Other): (foo)$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
# Last defined EDE code, no additional text.
dig_with_opts @10.53.0.3 +ednsopt=ede:0018 a.example +qr > dig.out.test$n 2>&1 || ret=1
pat='^; EDE: 24 (Invalid Data)$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
# First undefined EDE code, additional text "foo".
dig_with_opts @10.53.0.3 +ednsopt=ede:0019666f6f a.example +qr > dig.out.test$n 2>&1 || ret=1
pat='^; EDE: 25: (foo)$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
# EDE payload is too short
dig_with_opts @10.53.0.3 +ednsopt=ede a.example +qr > dig.out.test$n 2>&1 || ret=1
pat='^; EDE:$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
# EDE payload is too short
dig_with_opts @10.53.0.3 +ednsopt=ede:00 a.example +qr > dig.out.test$n 2>&1 || ret=1
pat='^; EDE: 00 (".")$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
ret=0
dig_with_opts @10.53.0.3 -q -m > dig.out.test$n 2>&1
pat='^;-m\..*IN.*A$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
grep "Dump of all outstanding memory allocations" dig.out.test$n > /dev/null && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
ret=0
dig_with_opts @10.53.0.3 +short +expandaaaa AAAA ns2.example > dig.out.test$n 2>&1 || ret=1
pat='^fd92:7065:0b8e:ffff:0000:0000:0000:0002$'
- tr -d '\r' < dig.out.test$n | grep "$pat" > /dev/null || ret=1
+ grep "$pat" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
echo_i "ns1/sign.sh"
-cp "../ns2/dsset-example$TP" .
-cp "../ns2/dsset-in-addr.arpa$TP" .
-cp "../ns2/dsset-too-many-iterations$TP" .
+cp "../ns2/dsset-example." .
+cp "../ns2/dsset-in-addr.arpa." .
+cp "../ns2/dsset-too-many-iterations." .
-grep "$DEFAULT_ALGORITHM_NUMBER [12] " "../ns2/dsset-algroll$TP" > "dsset-algroll$TP"
-cp "../ns6/dsset-optout-tld$TP" .
+grep "$DEFAULT_ALGORITHM_NUMBER [12] " "../ns2/dsset-algroll." > "dsset-algroll."
+cp "../ns6/dsset-optout-tld." .
ksk=$("$KEYGEN" -q -fk -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone "$zone")
zsk=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -n zone "$zone")
# Get the DS records for the "trusted." and "managed." zones.
for subdomain in secure unsupported disabled enabled
do
- cp "../ns3/dsset-$subdomain.managed$TP" .
- cp "../ns3/dsset-$subdomain.trusted$TP" .
+ cp "../ns3/dsset-$subdomain.managed." .
+ cp "../ns3/dsset-$subdomain.trusted." .
done
# Sign the "trusted." and "managed." zones.
dnskey-nsec3-unknown managed-future revkey \
dname-at-apex-nsec3 occluded
do
- cp "../ns3/dsset-$subdomain.example$TP" .
+ cp "../ns3/dsset-$subdomain.example." .
done
# Sign the "example." zone.
zonefiletmp=$(mktemp "$zonefile.XXXXXX") || exit 1
"$CHECKZONE" -D -q -i local "$zone" "$zonefile.signed" |
-tr -d '\r' |
awk '
tolower($1) == "bad-cname.example." && $4 == "RRSIG" && $5 == "CNAME" {
for (i = 1; i <= NF; i++ ) {
awk '$4 == "DNSKEY" { $7 = 100 } $4 == "RRSIG" { $6 = 100 } { print }' ${zonefile}.tmp > ${zonefile}.signed
-DSFILE="dsset-${zone}${TP}"
+DSFILE="dsset-${zone}."
$DSFROMKEY -A -f ${zonefile}.signed "$zone" > "$DSFILE"
#
awk '$4 == "DNSKEY" { $7 = 255 } $4 == "RRSIG" { $6 = 255 } { print }' ${zonefile}.tmp > ${zonefile}.signed
-DSFILE="dsset-${zone}${TP}"
+DSFILE="dsset-${zone}."
$DSFROMKEY -A -f ${zonefile}.signed "$zone" > "$DSFILE"
#
awk '$4 == "DNSKEY" { $7 = 100; print } $4 == "RRSIG" { $6 = 100; print } { print }' ${zonefile}.tmp > ${zonefile}.signed
-DSFILE="dsset-${zone}${TP}"
+DSFILE="dsset-${zone}."
$DSFROMKEY -A -f ${zonefile}.signed "$zone" > "$DSFILE"
#
cat "$infile" "$keyname.key" > "$zonefile"
"$SIGNER" -P -o "$zone" "$zonefile" > /dev/null
-sed -e 's/bogus/badds/g' < dsset-bogus.example$TP > dsset-badds.example$TP
+sed -e 's/bogus/badds/g' < dsset-bogus.example. > dsset-badds.example.
#
# A zone with future signatures.
zskname=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" "$zone")
dnskeyname=$("$KEYGEN" -q -a "$DEFAULT_ALGORITHM" -fk "delegation.$zone")
keyname=$("$KEYGEN" -q -a DH -b 1024 -n HOST -T KEY "delegation.$zone")
-$DSFROMKEY "$dnskeyname.key" > "dsset-delegation.${zone}$TP"
+$DSFROMKEY "$dnskeyname.key" > "dsset-delegation.${zone}."
cat "$infile" "${kskname}.key" "${zskname}.key" "${keyname}.key" \
- "${dnskeyname}.key" "dsset-delegation.${zone}$TP" >"$zonefile"
+ "${dnskeyname}.key" "dsset-delegation.${zone}." >"$zonefile"
"$SIGNER" -P -o "$zone" "$zonefile" > /dev/null
# Ensure there is not a blank line before "Secure roots:".
#
check_secroots_layout () {
- tr -d '\r' < "$1" | \
awk '$0 == "" { if (empty) exit(1); empty=1; next }
/Start view/ { if (!empty) exit(1) }
/Secure roots:/ { if (empty) exit(1) }
/Negative trust anchors:/ { if (!empty) exit(1) }
- { empty=0 }'
+ { empty=0 }' $1
return $?
}
get_rsasha1_key_ids_from_sigs() {
zone=$1
- tr -d '\r' < signer/$zone.db.signed | \
awk '
NF < 8 { next }
$(NF-5) != "RRSIG" { next }
getline;
print $3;
}
- ' | \
- sort -u
+ ' signer/$zone.db.signed | sort -u
}
# Test dnssec-signzone ZSK prepublish smooth rollover.
ret=0
echo_i "killing ns4 with SIGTERM"
-$KILL -TERM "$(cat ns4/named.pid)"
+kill -TERM "$(cat ns4/named.pid)"
rm -f ns4/named.pid
#
grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
echo_i "killing ns4 with SIGTERM"
-$KILL -TERM "$(cat ns4/named.pid)"
+kill -TERM "$(cat ns4/named.pid)"
rm -f ns4/named.pid
echo_i "sleeping for an additional 4 seconds for ns4 to fully shutdown"
grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n.2 > /dev/null || ret=1
echo_i "killing ns4 with SIGTERM"
-$KILL -TERM "$(cat ns4/named.pid)"
+kill -TERM "$(cat ns4/named.pid)"
rm -f named.pid
echo_i "sleeping for an additional 4 seconds for ns4 to fully shutdown"
echo_i "testing loading out of bounds lifetime from NTA file ($n)"
echo_i "killing ns4 with SIGTERM"
-$KILL -TERM "$(cat ns4/named.pid)"
+kill -TERM "$(cat ns4/named.pid)"
rm -f ns4/named.pid
echo_i "sleeping for an additional 4 seconds for ns4 to fully shutdown"
for (i=1;i<7;i++) printf("%s ", $i);
for (i=7;i<=NF;i++) printf("%s", $i);
printf("\n");
-}' < ns1/dsset-algroll$TP > canonical2.$n || ret=1
-$DIFF -b canonical1.$n canonical2.$n > /dev/null 2>&1 || ret=1
+}' < ns1/dsset-algroll. > canonical2.$n || ret=1
+diff -b canonical1.$n canonical2.$n > /dev/null 2>&1 || ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
status=$((status+ret))
dig_with_answeropts +nottlid nosign.example ns @10.53.0.3 | \
grep RRSIG | sed 's/[ ][ ]*/ /g' > dig.out.ns3.test$n 2>&1
# the NS RRSIG should not be changed
-$DIFF nosign.before dig.out.ns3.test$n > /dev/null|| ret=1
+diff nosign.before dig.out.ns3.test$n > /dev/null|| ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
status=$((status+ret))
dig_with_opts +noall +answer @10.53.0.2 cds cds-update.secure > dig.out.test$n
lines=$(awk '$4 == "CDS" {print}' dig.out.test$n | wc -l)
test "${lines:-10}" -eq 1 || ret=1
-lines=$(tr -d '\r' < dig.out.test$n | awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' | wc -l)
+lines=$(awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' dig.out.test$n | wc -l)
test "$lines" -eq 1 || ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
test "$lines" -eq 1 || ret=1
lines=$(awk '$4 == "CDS" {print}' dig.out.test$n | wc -l)
test "$lines" -eq 1 || ret=1
-lines=$(tr -d '\r' < dig.out.test$n | awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' | wc -l)
+lines=$(awk '$4 == "CDS" && $5 == "0" && $6 == "0" && $7 == "0" && $8 == "00" {print}' dig.out.test$n | wc -l)
test "$lines" -eq 1 || ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
dig_with_opts +noall +answer @10.53.0.2 cdnskey cdnskey-update.secure > dig.out.test$n
lines=$(awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l)
test "${lines:-10}" -eq 1 || ret=1
-lines=$(tr -d '\r' < dig.out.test$n | awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' | wc -l)
+lines=$(awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' dig.out.test$n | wc -l)
test "${lines:-10}" -eq 1 || ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
test "$lines" -eq 1 || ret=1
lines=$(awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l)
test "$lines" -eq 1 || ret=1
-lines=$(tr -d '\r' < dig.out.test$n | awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' | wc -l)
+lines=$(awk '$4 == "CDNSKEY" && $5 == "0" && $6 == "3" && $7 == "0" && $8 == "AA==" {print}' dig.out.test$n | wc -l)
test "${lines:-10}" -eq 1 || ret=1
n=$((n+1))
test "$ret" -eq 0 || echo_i "failed"
(cd ../ns2 && $SHELL sign.sh)
-cp ../ns2/dsset-good$TP .
-cp ../ns2/dsset-bad$TP .
+cp ../ns2/dsset-good. .
+cp ../ns2/dsset-bad. .
key1=`$KEYGEN -q -a RSASHA1 -b 1024 -n zone $zone`
key2=`$KEYGEN -q -a RSASHA1 -b 2048 -n zone -f KSK $zone`
$SIGNER -P -g -o $zone1 $zonefile1 > /dev/null
$SIGNER -P -g -o $zone2 $zonefile2 > /dev/null
-DSFILENAME1=dsset-${zone1}${TP}
-DSFILENAME2=dsset-${zone2}${TP}
+DSFILENAME1=dsset-${zone1}.
+DSFILENAME2=dsset-${zone2}.
$DSFROMKEY -a SHA-256 $keyname12 > $DSFILENAME1
$DSFROMKEY -a SHA-256 $keyname22 > $DSFILENAME2
logfile="$1"
start_pattern="$2"
pattern="$3"
- nextpartpeek "$logfile" | tr -d '\r' | sed -n "/$start_pattern/,/^\$/p" | grep -c "$pattern"
+ nextpartpeek "$logfile" | sed -n "/$start_pattern/,/^\$/p" | grep -c "$pattern"
)
check_sent() (
done
# Sanity check: the SOA record should be unchanged
$DIG $DIGOPTS +short @10.53.0.3 primary SOA > dig.out.ns3.test$n.2 || ret=1
-$DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null || ret=1
+diff dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
retry_quiet 10 _includefile_loaded
# Sanity check: the SOA record should be changed
$DIG $DIGOPTS +short @10.53.0.3 primary SOA > dig.out.ns3.test$n.2 || ret=1
-$DIFF dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null && ret=1
+diff dig.out.ns3.test$n.1 dig.out.ns3.test$n.2 > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
$SETTIME -P +3600 "$BASE_FILE" > /dev/null || log_error "settime failed"
grep "; Publish: " "$KEY_FILE" > /dev/null || log_error "mismatch published in $KEY_FILE"
grep "Publish: " "$PRIVATE_FILE" > /dev/null || log_error "mismatch published in $PRIVATE_FILE"
-$DIFF "$CMP_FILE" "$STATE_FILE" || log_error "unexpected file change in $STATE_FILE"
+diff "$CMP_FILE" "$STATE_FILE" || log_error "unexpected file change in $STATE_FILE"
test "$ret" -eq 0 || echo_i "failed"
status=$((status+ret))
ret=0
n=`expr $n + 1`
$RNDCCMD tcp-timeouts 300 300 300 200 > output
-$DIFF -b output expected || ret=1
+diff -b output expected || ret=1
$DIG $DIGOPTS +vc +keepalive foo.example @10.53.0.2 > dig.out.test$n
grep "; TCP KEEPALIVE: 20.0 secs" dig.out.test$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
echo_i "test of master file RFC1035 TTL and \$TTL semantics ($n)"
$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n
-$DIFF dig.out.$n knowngood.dig.out || status=1
+diff dig.out.$n knowngood.dig.out || status=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "test owner inheritance after "'$INCLUDE'" ($n)"
$CHECKZONE -Dq example zone/inheritownerafterinclude.db > checkzone.out$n
-$DIFF checkzone.out$n zone/inheritownerafterinclude.good || ret=1
+diff checkzone.out$n zone/inheritownerafterinclude.good || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
# the compression disabled message should be at least twice as large as with
# compression disabled, but the content should be the same
echo_i "Checking if responses are identical other than in message size"
-$DIFF dig.compdis.sorted.test dig.compen.sorted.test >/dev/null
+diff dig.compdis.sorted.test dig.compen.sorted.test >/dev/null
ret=$?
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
sleep 1 # make sure filesystem time stamp is newer for reload.
rm -f ns2/example.db
cp -f ns2/example2.db ns2/example.db
-if [ ! "$CYGWIN" ]; then
- echo_i "reloading with example2 using HUP and waiting up to 45 seconds"
- $KILL -HUP `cat ns2/named.pid`
-else
- echo_i "reloading with example2 using rndc and waiting up to 45 seconds"
- rndc_reload ns2 10.53.0.2
-fi
+echo_i "reloading with example2 using HUP and waiting up to 45 seconds"
+kill -HUP `cat ns2/named.pid`
try=0
while test $try -lt 45
echo_i "SIGKILL and restart server ns1"
cd ns1
-$KILL -KILL `cat named.pid`
+kill -KILL `cat named.pid`
rm named.pid
cd ..
sleep 10
sleep 5
-if [ ! "$CYGWIN" ]; then
- echo_i "SIGHUP secondary"
- $KILL -HUP `cat ns2/named.pid`
-else
- echo_i "reload secondary"
- rndc_reload ns2 10.53.0.2
-fi
+echo_i "SIGHUP secondary"
+kill -HUP `cat ns2/named.pid`
sleep 5
sleep 5
-if [ ! "$CYGWIN" ]; then
- echo_i "SIGHUP secondary again"
- $KILL -HUP `cat ns2/named.pid`
-else
- echo_i "reload secondary again"
- rndc_reload ns2 10.53.0.2
-fi
+echo_i "SIGHUP secondary again"
+kill -HUP `cat ns2/named.pid`
sleep 5
(cd ../ns2 && $SHELL -e sign.sh )
-cp ../ns2/dsset-example$TP .
-cp ../ns2/dsset-example.com$TP .
+cp ../ns2/dsset-example. .
+cp ../ns2/dsset-example.com. .
keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
$PIPEQUERIES -p ${PORT} < input > raw || ret=1
awk '{ print $1 " " $5 }' < raw > output
sort < output > output-sorted
-$DIFF ref output-sorted || { ret=1 ; echo_i "diff sorted failed"; }
-$DIFF ref output > /dev/null && { ret=1 ; echo_i "diff out of order failed"; }
+diff ref output-sorted || { ret=1 ; echo_i "diff sorted failed"; }
+diff ref output > /dev/null && { ret=1 ; echo_i "diff out of order failed"; }
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
$MDIG $MDIGOPTS +noall +answer +vc -f input -b 10.53.0.4 @10.53.0.4 > raw.mdig
awk '{ print $1 " " $5 }' < raw.mdig > output.mdig
sort < output.mdig > output-sorted.mdig
-$DIFF ref output-sorted.mdig || { ret=1 ; echo_i "diff sorted failed"; }
-$DIFF ref output.mdig > /dev/null && { ret=1 ; echo_i "diff out of order failed"; }
+diff ref output-sorted.mdig || { ret=1 ; echo_i "diff sorted failed"; }
+diff ref output.mdig > /dev/null && { ret=1 ; echo_i "diff out of order failed"; }
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
sleep 1
$PIPEQUERIES -p ${PORT} ++ < inputb > rawb || ret=1
awk '{ print $1 " " $5 }' < rawb > outputb
-$DIFF refb outputb || ret=1
+diff refb outputb || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
sleep 1
$MDIG $MDIGOPTS +noall +answer +vc -f inputb -b 10.53.0.7 @10.53.0.4 > rawb.mdig
awk '{ print $1 " " $5 }' < rawb.mdig > outputb.mdig
-$DIFF refb outputb.mdig || ret=1
+diff refb outputb.mdig || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "icky.icky.icky.ptang.zoop.boing.good. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
-cat << __EOF | $DIFF ans2/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
ADDR icky.icky.icky.ptang.zoop.boing.good.
ADDR ns3.good.
ADDR ns3.good.
ADDR a.bit.longer.ns.name.good.
ADDR a.bit.longer.ns.name.good.
__EOF
-echo "ADDR icky.icky.icky.ptang.zoop.boing.good." | $DIFF ans3/query.log - > /dev/null || ret=1
-echo "ADDR icky.icky.icky.ptang.zoop.boing.good." | $DIFF ans4/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.good." | diff ans3/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.good." | diff ans4/query.log - > /dev/null || ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "icky.icky.icky.ptang.zoop.boing.bad. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
-cat << __EOF | $DIFF ans2/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
ADDR icky.icky.icky.ptang.zoop.boing.bad.
ADDR ns3.bad.
ADDR ns3.bad.
ADDR a.bit.longer.ns.name.bad.
ADDR a.bit.longer.ns.name.bad.
__EOF
-echo "ADDR icky.icky.icky.ptang.zoop.boing.bad." | $DIFF ans3/query.log - > /dev/null || ret=1
-echo "ADDR icky.icky.icky.ptang.zoop.boing.bad." | $DIFF ans4/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.bad." | diff ans3/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.bad." | diff ans4/query.log - > /dev/null || ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "icky.icky.icky.ptang.zoop.boing.slow. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
-cat << __EOF | $DIFF ans2/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
ADDR icky.icky.icky.ptang.zoop.boing.slow.
ADDR ns3.slow.
ADDR ns3.slow.
ADDR a.bit.longer.ns.name.slow.
ADDR a.bit.longer.ns.name.slow.
__EOF
-echo "ADDR icky.icky.icky.ptang.zoop.boing.slow." | $DIFF ans3/query.log - > /dev/null || ret=1
-echo "ADDR icky.icky.icky.ptang.zoop.boing.slow." | $DIFF ans4/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.slow." | diff ans3/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.slow." | diff ans4/query.log - > /dev/null || ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "icky.icky.icky.ptang.zoop.boing.ugly. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
-cat << __EOF | $DIFF ans2/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
ADDR icky.icky.icky.ptang.zoop.boing.ugly.
ADDR ns3.ugly.
ADDR ns3.ugly.
ADDR a.bit.longer.ns.name.ugly.
ADDR a.bit.longer.ns.name.ugly.
__EOF
-echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | $DIFF ans3/query.log - > /dev/null || ret=1
-echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | $DIFF ans4/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | diff ans3/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | diff ans4/query.log - > /dev/null || ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
grep "icky.icky.icky.ptang.zoop.boing.good. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR a.bit.longer.ns.name.good.
ADDR a.bit.longer.ns.name.good.
ADDR ns2.good.
NS good.
NS zoop.boing.good.
__EOF
-cat << __EOF | $DIFF ans3/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans3/query.log - > /dev/null || ret=1
NS zoop.boing.good.
NS ptang.zoop.boing.good.
NS icky.ptang.zoop.boing.good.
__EOF
-cat << __EOF | $DIFF ans4/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log - > /dev/null || ret=1
NS icky.ptang.zoop.boing.good.
NS icky.icky.ptang.zoop.boing.good.
ADDR icky.icky.icky.ptang.zoop.boing.good.
grep "icky.icky.icky.ptang.zoop.boing.good. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR _.boing.good.
ADDR _.zoop.boing.good.
ADDR a.bit.longer.ns.name.good.
ADDR ns3.good.
ADDR ns3.good.
__EOF
-cat << __EOF | $DIFF ans3/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans3/query.log - > /dev/null || ret=1
ADDR _.ptang.zoop.boing.good.
ADDR _.icky.ptang.zoop.boing.good.
__EOF
-cat << __EOF | $DIFF ans4/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log - > /dev/null || ret=1
ADDR _.icky.icky.ptang.zoop.boing.good.
ADDR icky.icky.icky.ptang.zoop.boing.good.
__EOF
grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR ns2.bad.
NS bad.
NS boing.bad.
grep "icky.icky.icky.ptang.zoop.boing.bad. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR _.boing.bad.
ADDR _.zoop.boing.bad.
ADDR a.bit.longer.ns.name.bad.
ADDR ns3.bad.
ADDR ns3.bad.
__EOF
-cat << __EOF | $DIFF ans3/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans3/query.log - > /dev/null || ret=1
ADDR _.ptang.zoop.boing.bad.
ADDR _.icky.ptang.zoop.boing.bad.
__EOF
-cat << __EOF | $DIFF ans4/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log - > /dev/null || ret=1
ADDR _.icky.icky.ptang.zoop.boing.bad.
ADDR icky.icky.icky.ptang.zoop.boing.bad.
__EOF
grep "status: SERVFAIL" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR ns2.ugly.
NS boing.ugly.
NS ugly.
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR _.boing.ugly.
ADDR a.bit.longer.ns.name.ugly.
ADDR a.bit.longer.ns.name.ugly.
ADDR ns3.ugly.
ADDR ns3.ugly.
__EOF
-echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | $DIFF ans3/query.log - > /dev/null || ret=1
-echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | $DIFF ans4/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | diff ans3/query.log - > /dev/null || ret=1
+echo "ADDR icky.icky.icky.ptang.zoop.boing.ugly." | diff ans4/query.log - > /dev/null || ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status+ret))
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "icky.icky.icky.ptang.zoop.boing.slow. 1 IN A 192.0.2.1" dig.out.test$n > /dev/null || ret=1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR a.bit.longer.ns.name.slow.
ADDR a.bit.longer.ns.name.slow.
ADDR ns2.slow.
NS slow.
NS zoop.boing.slow.
__EOF
-cat << __EOF | $DIFF ans3/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans3/query.log - > /dev/null || ret=1
NS zoop.boing.slow.
NS ptang.zoop.boing.slow.
NS icky.ptang.zoop.boing.slow.
__EOF
-cat << __EOF | $DIFF ans4/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log - > /dev/null || ret=1
NS icky.ptang.zoop.boing.slow.
NS icky.icky.ptang.zoop.boing.slow.
ADDR icky.icky.icky.ptang.zoop.boing.slow.
grep "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.f.4.0.1.0.0.2.ip6.arpa. 1 IN PTR nee.com." dig.out.test$n > /dev/null || ret=1
sleep 1
grep -v ADDR ans2/query.log > ans2/query.log.trimmed
-cat << __EOF | $DIFF ans2/query.log.trimmed - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.trimmed - > /dev/null || ret=1
NS 1.0.0.2.ip6.arpa.
NS 8.f.4.0.1.0.0.2.ip6.arpa.
NS 0.0.0.0.8.f.4.0.1.0.0.2.ip6.arpa.
grep "more.icky.icky.icky.ptang.zoop.boing.good. 1 IN A 192.0.2.2" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR a.bit.longer.ns.name.good.
ADDR a.bit.longer.ns.name.good.
ADDR ns2.good.
NS good.
NS zoop.boing.good.
__EOF
-cat << __EOF | $DIFF ans3/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans3/query.log - > /dev/null || ret=1
NS zoop.boing.good.
NS ptang.zoop.boing.good.
NS icky.ptang.zoop.boing.good.
__EOF
# There's no NS icky.icky.icky.ptang.zoop.boing.good. query - we skipped it.
-cat << __EOF | $DIFF ans4/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log - > /dev/null || ret=1
NS icky.ptang.zoop.boing.good.
NS icky.icky.ptang.zoop.boing.good.
ADDR more.icky.icky.icky.ptang.zoop.boing.good.
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "a.bit.longer.ns.name.fwd. 1 IN A 10.53.0.4" dig.out.test$n >/dev/null || ret=1
sleep 1
-cat << __EOF | $DIFF ans2/query.log - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log - > /dev/null || ret=1
ADDR a.bit.longer.ns.name.fwd.
__EOF
for ans in ans2; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "a\.b\.stale\..*1.*IN.*TXT.*peekaboo" dig.out.test$n > /dev/null || ret=1
sleep 1
-echo "TXT a.b.stale." | $DIFF ans2/query.log - > /dev/null || ret=1
-echo "TXT a.b.stale." | $DIFF ans3/query.log - > /dev/null || ret=1
+echo "TXT a.b.stale." | diff ans2/query.log - > /dev/null || ret=1
+echo "TXT a.b.stale." | diff ans3/query.log - > /dev/null || ret=1
test -f ans4/query.log && ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
grep "a\.b\.stale\..*1.*IN.*TXT.*hooray" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR ns.b.stale.
ADDR ns2.stale.
NS b.stale.
__EOF
test -f ans3/query.log && ret=1
sort ans4/query.log > ans4/query.log.sorted
-cat << __EOF | $DIFF ans4/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log.sorted - > /dev/null || ret=1
ADDR ns.b.stale.
NS b.stale.
TXT a.b.stale.
grep "a\.b\.stale\..*1.*IN.*TXT.*hooray" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR _.b.stale.
ADDR ns.b.stale.
ADDR ns2.stale.
__EOF
test -f ans3/query.log && ret=1
sort ans4/query.log > ans4/query.log.sorted
-cat << __EOF | $DIFF ans4/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log.sorted - > /dev/null || ret=1
ADDR ns.b.stale.
TXT a.b.stale.
__EOF
grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
grep "a\.b\.stale\..*1.*IN.*TXT.*peekaboo" dig.out.test$n > /dev/null || ret=1
sleep 1
-echo "TXT a.b.stale." | $DIFF ans2/query.log - > /dev/null || ret=1
-echo "TXT a.b.stale." | $DIFF ans3/query.log - > /dev/null || ret=1
+echo "TXT a.b.stale." | diff ans2/query.log - > /dev/null || ret=1
+echo "TXT a.b.stale." | diff ans3/query.log - > /dev/null || ret=1
test -f ans4/query.log && ret=1
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
if [ $ret != 0 ]; then echo_i "failed"; fi
grep "a\.b\.stale\..*1.*IN.*TXT.*hooray" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
NS b.stale.
NS stale.
__EOF
test -f ans3/query.log && ret=1
sort ans4/query.log > ans4/query.log.sorted
-cat << __EOF | $DIFF ans4/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log.sorted - > /dev/null || ret=1
NS b.stale.
TXT a.b.stale.
__EOF
grep "a\.b\.stale\..*1.*IN.*TXT.*hooray" dig.out.test$n > /dev/null || ret=1
sleep 1
sort ans2/query.log > ans2/query.log.sorted
-cat << __EOF | $DIFF ans2/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans2/query.log.sorted - > /dev/null || ret=1
ADDR _.b.stale.
__EOF
test -f ans3/query.log && ret=1
sort ans4/query.log > ans4/query.log.sorted
-cat << __EOF | $DIFF ans4/query.log.sorted - > /dev/null || ret=1
+cat << __EOF | diff ans4/query.log.sorted - > /dev/null || ret=1
TXT a.b.stale.
__EOF
for ans in ans2 ans3 ans4; do mv -f $ans/query.log query-$ans-$n.log 2>/dev/null || true; done
ret=0
rm ns2/named.stats 2>/dev/null
$RNDCCMD 10.53.0.2 stats || ret=1
-PRE=`tr -d '\r' < ns2/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p"`
+PRE=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns2/named.stats`
$DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
rm ns2/named.stats 2>/dev/null
$RNDCCMD 10.53.0.2 stats || ret=1
-POST=`tr -d '\r' < ns2/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p"`
+POST=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns2/named.stats`
if [ `expr $POST - $PRE` != 1 ]; then ret=1; fi
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
echo_i "checking that redirect zones reload correctly"
ret=0
sleep 1 # ensure file mtime will have changed
-tr -d '\r' < ns2/example.db.in | sed -e 's/0 0 0 0 0/1 0 0 0 0/' > ns2/example.db
-tr -d '\r' < ns2/redirect.db.in | sed -e 's/0 0 0 0 0/1 0 0 0 0/' -e 's/\.1$/.2/' > ns2/redirect.db
+cat ns2/example.db.in | sed -e 's/0 0 0 0 0/1 0 0 0 0/' > ns2/example.db
+cat ns2/redirect.db.in | sed -e 's/0 0 0 0 0/1 0 0 0 0/' -e 's/\.1$/.2/' > ns2/redirect.db
rndc_reload ns2 10.53.0.2
for i in 1 2 3 4 5 6 7 8 9; do
tmp=0
ret=0
rm ns4/named.stats 2>/dev/null
$RNDCCMD 10.53.0.4 stats || ret=1
-PRE_RED=`tr -d '\r' < ns4/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p"`
-PRE_SUC=`tr -d '\r' < ns4/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p"`
+PRE_RED=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns4/named.stats`
+PRE_SUC=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p" ns4/named.stats`
$DIG $DIGOPTS nonexist. @10.53.0.4 -b 10.53.0.2 aaaa > dig.out.ns4.test$n || ret=1
grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
grep "nonexist. .*2001:ffff:ffff::6464:6401" dig.out.ns4.test$n > /dev/null || ret=1
ret=0
rm ns4/named.stats 2>/dev/null
$RNDCCMD 10.53.0.4 stats || ret=1
-POST_RED=`tr -d '\r' < ns4/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p"`
-POST_SUC=`tr -d '\r' < ns4/named.stats | sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p"`
+POST_RED=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected$/\1/p" ns4/named.stats`
+POST_SUC=`sed -n -e "s/[ ]*\([0-9]*\).queries resulted in NXDOMAIN that were redirected and resulted in a successful remote lookup$/\1/p" ns4/named.stats`
if [ `expr $POST_RED - $PRE_RED` != 1 ]; then ret=1; fi
if [ `expr $POST_SUC - $PRE_SUC` != 1 ]; then ret=1; fi
n=`expr $n + 1`
cp $infile $zonefile
ksk=`$KEYGEN -q -a rsasha256 -fk $zone`
zsk=`$KEYGEN -q -a rsasha256 $zone`
-cat $ksk.key $zsk.key dsset-ds.example.net$TP >> $zonefile
+cat $ksk.key $zsk.key dsset-ds.example.net. >> $zonefile
$SIGNER -P -o $zone $zonefile > /dev/null
# Configure a static key to be used by delv
(cd ../ns2 && $SHELL sign.sh ${keyid:-00000} )
-cp ../ns2/dsset-example$TP .
+cp ../ns2/dsset-example. .
cat $infile $keyname.key > $zonefile
cat $1/$3 $1/$KEYNAME.key > $1/tmp
$SIGNER -P -K $1 -o $2 -f $1/$4 $1/tmp >/dev/null
sed -n -e 's/\(.*\) IN DNSKEY \([0-9]\{1,\} [0-9]\{1,\} [0-9]\{1,\}\) \(.*\)/trust-anchors {"\1" static-key \2 "\3";};/p' $1/$KEYNAME.key >>trusted.conf
- DSFILENAME=dsset-${2}${TP}
+ DSFILENAME=dsset-${2}.
rm $DSFILENAME $1/tmp
}
signzone ns2 tld2s base-tld2s.db tld2s.db
PID=`cat ns$1/named.pid 2>/dev/null`
if test -n "$PID"; then
echo_i "killing ns$1 server $PID"
- $KILL -9 $PID
+ kill -9 $PID
fi
fi
fi
digcmd $2 >$DIGNM
#ckalive "$2" "server crashed by 'dig $2'" || return 1
ADDR_ESC=`echo "$ADDR" | sed -e 's/\./\\\\./g'`
- ADDR_TTL=`tr -d '\r' < $DIGNM | sed -n -e "s/^[-.a-z0-9]\{1,\}[ ]*\([0-9]*\) IN AA* ${ADDR_ESC}\$/\1/p"`
+ ADDR_TTL=`sed -n -e "s/^[-.a-z0-9]\{1,\}[ ]*\([0-9]*\) IN AA* ${ADDR_ESC}\$/\1/p" $DIGNM`
if test -z "$ADDR_TTL"; then
setret "'dig $2' wrong; no address $ADDR record in $DIGNM"
return 1
if [ "$mode" = dnsrps ]; then
echo_i "checking that dnsrpzd is automatically restarted"
OLD_PID=`cat dnsrpzd.pid`
- $KILL "$OLD_PID"
+ kill "$OLD_PID"
n=0
while true; do
NEW_PID=`cat dnsrpzd.pid 2>/dev/null`
expect_recurse 5a 5
expect_recurse 5a 6
- if [ ! "$CYGWIN" -o -n "$PSSUSPEND" ]
- then
- # Group 6
- echo_i "check recursive behavior consistency during policy update races"
- run_server 6a
- sleep 1
- t=`expr $t + 1`
- echo_i "running dig to cache CNAME record (${t})"
- add_test_marker 10.53.0.1 10.53.0.2
- $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org CNAME > dig.out.${t}
- sleep 1
- echo_i "suspending authority server"
- PID=`cat ns1/named.pid`
- if [ "$CYGWIN" ]
- then
- $PSSUSPEND $PID
- else
- $KILL -STOP $PID
- fi
- echo_i "adding an NSDNAME policy"
- cp ns2/db.6a.00.policy.local ns2/saved.policy.local
- cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
- $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
- test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
- sleep 1
- t=`expr $t + 1`
- echo_i "running dig to follow CNAME (blocks, so runs in the background) (${t})"
- add_test_marker 10.53.0.2
- $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org A +time=5 > dig.out.${t} &
- sleep 1
- echo_i "removing the NSDNAME policy"
- cp ns2/db.6c.00.policy.local ns2/db.6a.00.policy.local
- $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
- test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
+ # Group 6
+ echo_i "check recursive behavior consistency during policy update races"
+ run_server 6a
+ sleep 1
+ t=`expr $t + 1`
+ echo_i "running dig to cache CNAME record (${t})"
+ add_test_marker 10.53.0.1 10.53.0.2
+ $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org CNAME > dig.out.${t}
+ sleep 1
+ echo_i "suspending authority server"
+ PID=`cat ns1/named.pid`
+ kill -STOP $PID
+ echo_i "adding an NSDNAME policy"
+ cp ns2/db.6a.00.policy.local ns2/saved.policy.local
+ cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
+ $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
+ test -f dnsrpzd.pid && kill -USR1 `cat dnsrpzd.pid`
+ sleep 1
+ t=`expr $t + 1`
+ echo_i "running dig to follow CNAME (blocks, so runs in the background) (${t})"
+ add_test_marker 10.53.0.2
+ $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org A +time=5 > dig.out.${t} &
+ sleep 1
+ echo_i "removing the NSDNAME policy"
+ cp ns2/db.6c.00.policy.local ns2/db.6a.00.policy.local
+ $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
+ test -f dnsrpzd.pid && kill -USR1 `cat dnsrpzd.pid`
+ sleep 1
+ echo_i "resuming authority server"
+ PID=`cat ns1/named.pid`
+ kill -CONT $PID
+ add_test_marker 10.53.0.1
+ for n in 1 2 3 4 5 6 7 8 9
+ do
sleep 1
- echo_i "resuming authority server"
- PID=`cat ns1/named.pid`
- if [ "$CYGWIN" ]
- then
- $PSSUSPEND -r $PID
- else
- $KILL -CONT $PID
- fi
- add_test_marker 10.53.0.1
- for n in 1 2 3 4 5 6 7 8 9
- do
- sleep 1
- [ -s dig.out.${t} ] || continue
- grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
- done
- grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
- echo_i "test ${t} failed"
- status=1
- }
+ [ -s dig.out.${t} ] || continue
+ grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
+ done
+ grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
+ echo_i "test ${t} failed"
+ status=1
+ }
- echo_i "check recursive behavior consistency during policy removal races"
- cp ns2/saved.policy.local ns2/db.6a.00.policy.local
- run_server 6a
- sleep 1
- t=`expr $t + 1`
- echo_i "running dig to cache CNAME record (${t})"
- add_test_marker 10.53.0.1 10.53.0.2
- $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org CNAME > dig.out.${t}
- sleep 1
- echo_i "suspending authority server"
- PID=`cat ns1/named.pid`
- if [ "$CYGWIN" ]
- then
- $PSSUSPEND $PID
- else
- $KILL -STOP $PID
- fi
- echo_i "adding an NSDNAME policy"
- cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
- $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
- test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
- sleep 1
- t=`expr $t + 1`
- echo_i "running dig to follow CNAME (blocks, so runs in the background) (${t})"
- add_test_marker 10.53.0.2
- $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org A +time=5 > dig.out.${t} &
- sleep 1
- echo_i "removing the policy zone"
- cp ns2/named.default.conf ns2/named.conf
- rndc_reconfig ns2 10.53.0.2
- test -f dnsrpzd.pid && $KILL -USR1 `cat dnsrpzd.pid`
+ echo_i "check recursive behavior consistency during policy removal races"
+ cp ns2/saved.policy.local ns2/db.6a.00.policy.local
+ run_server 6a
+ sleep 1
+ t=`expr $t + 1`
+ echo_i "running dig to cache CNAME record (${t})"
+ add_test_marker 10.53.0.1 10.53.0.2
+ $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org CNAME > dig.out.${t}
+ sleep 1
+ echo_i "suspending authority server"
+ PID=`cat ns1/named.pid`
+ kill -STOP $PID
+ echo_i "adding an NSDNAME policy"
+ cp ns2/db.6b.00.policy.local ns2/db.6a.00.policy.local
+ $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT} reload 6a.00.policy.local 2>&1 | sed 's/^/ns2 /' | cat_i
+ test -f dnsrpzd.pid && kill -USR1 `cat dnsrpzd.pid`
+ sleep 1
+ t=`expr $t + 1`
+ echo_i "running dig to follow CNAME (blocks, so runs in the background) (${t})"
+ add_test_marker 10.53.0.2
+ $DIG $DIGOPTS @10.53.0.2 -p ${PORT} www.test.example.org A +time=5 > dig.out.${t} &
+ sleep 1
+ echo_i "removing the policy zone"
+ cp ns2/named.default.conf ns2/named.conf
+ rndc_reconfig ns2 10.53.0.2
+ test -f dnsrpzd.pid && kill -USR1 `cat dnsrpzd.pid`
+ sleep 1
+ echo_i "resuming authority server"
+ PID=`cat ns1/named.pid`
+ kill -CONT $PID
+ add_test_marker 10.53.0.1
+ for n in 1 2 3 4 5 6 7 8 9; do
sleep 1
- echo_i "resuming authority server"
- PID=`cat ns1/named.pid`
- if [ "$CYGWIN" ]
- then
- $PSSUSPEND -r $PID
- else
- $KILL -CONT $PID
- fi
- add_test_marker 10.53.0.1
- for n in 1 2 3 4 5 6 7 8 9; do
- sleep 1
- [ -s dig.out.${t} ] || continue
- grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
- done
- grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
- echo_i "test ${t} failed"
- status=1
- }
- fi
+ [ -s dig.out.${t} ] || continue
+ grep "status: .*," dig.out.${t} > /dev/null 2>&1 && break
+ done
+ grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || {
+ echo_i "test ${t} failed"
+ status=1
+ }
# Check maximum number of RPZ zones (64)
t=`expr $t + 1`
n=`expr $n + 1`
echo_i "class list ($n)"
$RRCHECKER -C > classlist.out
-$DIFF classlist.out classlist.good || { echo_i "failed"; status=`expr $status + 1`; }
+diff classlist.out classlist.good || { echo_i "failed"; status=`expr $status + 1`; }
n=`expr $n + 1`
echo_i "type list ($n)"
$RRCHECKER -T > typelist.out
-$DIFF typelist.out typelist.good || { echo_i "failed"; status=`expr $status + 1`; }
+diff typelist.out typelist.good || { echo_i "failed"; status=`expr $status + 1`; }
n=`expr $n + 1`
echo_i "private type list ($n)"
$RRCHECKER -P > privatelist.out
-$DIFF privatelist.out privatelist.good || { echo_i "failed"; status=`expr $status + 1`; }
+diff privatelist.out privatelist.good || { echo_i "failed"; status=`expr $status + 1`; }
myecho() {
cat << EOF
done
ARGS="+burst +nocookie +continue +time=1 +tries=1 -p ${PORT} $* @$ns2 $DOMS"
$MDIG $ARGS 2>&1 | \
- tr -d '\r' | \
tee -a full-$FILENAME | \
sed -n -e '/^;; AUTHORITY/,/^$/d' \
-e '/^;; ADDITIONAL/,/^$/d' \
LABEL="$1"; shift
TYPE="$1"; shift
EXPECTED="$1"; shift
- C=`tr -d '\r' < ns2/named.stats |
+ C=`cat ns2/named.stats |
sed -n -e "s/[ ]*\([0-9]*\).responses $TYPE for rate limits.*/\1/p" |
tail -1`
C=`expr 0$C + 0`
grep "min-table-size 1" broken.out > /dev/null || setret "min-table-size 0 was not changed to 1"
if [ -f named.pid ]; then
- $KILL `cat named.pid`
+ kill `cat named.pid`
setret "named should not have started, but did"
fi
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
$DIGCMD @10.53.0.1 fixed.example > dig.out.fixed || ret=1
- $DIFF dig.out.fixed dig.out.fixed.good >/dev/null || ret=1
+ diff dig.out.fixed dig.out.fixed.good >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.fixed dig.out.$j
else
- $DIFF dig.out.fixed dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.fixed dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
- $DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
- $DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
- $DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
- $DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
- $DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
- $DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+ diff dig.out.0 dig.out.1 >/dev/null && ret=1
+ diff dig.out.0 dig.out.2 >/dev/null && ret=1
+ diff dig.out.0 dig.out.3 >/dev/null && ret=1
+ diff dig.out.1 dig.out.2 >/dev/null && ret=1
+ diff dig.out.1 dig.out.3 >/dev/null && ret=1
+ diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic dig.out.$j
else
- $DIFF dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic2 dig.out.$j
else
- $DIFF dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
match=0
for j in $GOOD_RANDOM
do
- eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+ eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
# Ensure 20 further queries result in the same response as the "reference" one.
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
$DIGCMD @10.53.0.1 none.example > dig.out.test$i || ret=1
- $DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
+ diff dig.out.none dig.out.test$i >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
$DIGCMD @10.53.0.2 fixed.example > dig.out.fixed || ret=1
- $DIFF dig.out.fixed dig.out.fixed.good || ret=1
+ diff dig.out.fixed dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic dig.out.$j
else
- $DIFF dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic2 dig.out.$j
else
- $DIFF dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
match=0
for j in $GOOD_RANDOM
do
- eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+ eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
# Ensure 20 further queries result in the same response as the "reference" one.
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
$DIGCMD @10.53.0.2 none.example > dig.out.test$i || ret=1
- $DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
+ diff dig.out.none dig.out.test$i >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
$DIGCMD @10.53.0.2 fixed.example > dig.out.fixed || ret=1
- $DIFF dig.out.fixed dig.out.fixed.good || ret=1
+ diff dig.out.fixed dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic dig.out.$j
else
- $DIFF dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic2 dig.out.$j
else
- $DIFF dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
match=0
for j in $GOOD_RANDOM
do
- eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+ eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
# Ensure 20 further queries result in the same response as the "reference" one.
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
$DIGCMD @10.53.0.2 none.example > dig.out.test$i || ret=1
- $DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
+ diff dig.out.none dig.out.test$i >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
do
$DIGCMD @10.53.0.3 fixed.example > dig.out.fixed || ret=1
- $DIFF dig.out.fixed dig.out.fixed.good || ret=1
+ diff dig.out.fixed dig.out.fixed.good || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic dig.out.$j
else
- $DIFF dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
if [ $i -le 4 ]; then
cp dig.out.cyclic2 dig.out.$j
else
- $DIFF dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
+ diff dig.out.cyclic2 dig.out.$j >/dev/null && matches=`expr $matches + 1`
fi
done
-$DIFF dig.out.0 dig.out.1 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.0 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.2 >/dev/null && ret=1
-$DIFF dig.out.1 dig.out.3 >/dev/null && ret=1
-$DIFF dig.out.2 dig.out.3 >/dev/null && ret=1
+diff dig.out.0 dig.out.1 >/dev/null && ret=1
+diff dig.out.0 dig.out.2 >/dev/null && ret=1
+diff dig.out.0 dig.out.3 >/dev/null && ret=1
+diff dig.out.1 dig.out.2 >/dev/null && ret=1
+diff dig.out.1 dig.out.3 >/dev/null && ret=1
+diff dig.out.2 dig.out.3 >/dev/null && ret=1
if [ $matches -ne 16 ]; then ret=1; fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
match=0
for j in $GOOD_RANDOM
do
- eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+ eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
# Ensure 20 further queries result in the same response as the "reference" one.
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
$DIGCMD @10.53.0.3 none.example > dig.out.test$i || ret=1
- $DIFF dig.out.none dig.out.test$i >/dev/null || ret=1
+ diff dig.out.none dig.out.test$i >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
match=0
for j in $GOOD_RANDOM
do
- eval "$DIFF dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
+ eval "diff dig.out.random dig.out.random.good$j >/dev/null && match$j=1 match=1"
if [ $match -eq 1 ]; then break; fi
done
if [ $match -eq 0 ]; then ret=1; fi
# Ensure 20 further queries result in the same response as the "reference" one.
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
$DIGCMD @10.53.0.4 nomatch.example > dig.out.test$i || ret=1
- $DIFF dig.out.nomatch dig.out.test$i >/dev/null || ret=1
+ diff dig.out.nomatch dig.out.test$i >/dev/null || ret=1
done
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
infile=root.db.in
zonefile=root.db
-cp ../ns2/dsset-example.in dsset-example$TP
+cp ../ns2/dsset-example.in dsset-example.
keyname=`$KEYGEN -q -a RSASHA1 -b 1024 -n zone $zone`
if [ "$baseport" -eq 0 ]; then
log_flags="$log_flags -p 5300"
fi
- env - CYGWIN="$CYGWIN" SYSTEMTEST_FORCE_COLOR="$SYSTEMTEST_FORCE_COLOR" SYSTEMTEST_NO_CLEAN="$SYSTEMTEST_NO_CLEAN" SLOT="$SLOT" SOFTHSM2_CONF="$SOFTHSM2_CONF" PATH="$PATH" ${LD_LIBRARY_PATH:+"LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"} TESTS="$*" TEST_SUITE_LOG=run.log LOG_DRIVER_FLAGS="--verbose yes --color-tests yes" LOG_FLAGS="$log_flags" TEST_LARGE_MAP="${TEST_LARGE_MAP}" make -e check
+ env - SYSTEMTEST_FORCE_COLOR="$SYSTEMTEST_FORCE_COLOR" SYSTEMTEST_NO_CLEAN="$SYSTEMTEST_NO_CLEAN" SLOT="$SLOT" SOFTHSM2_CONF="$SOFTHSM2_CONF" PATH="$PATH" ${LD_LIBRARY_PATH:+"LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"} TESTS="$*" TEST_SUITE_LOG=run.log LOG_DRIVER_FLAGS="--verbose yes --color-tests yes" LOG_FLAGS="$log_flags" TEST_LARGE_MAP="${TEST_LARGE_MAP}" make -e check
exit $?
fi
#
# numprocess Number of concurrent processes to use when running the tests.
# The default is one, which causes the tests to run sequentially.
-# (This is ignored when running on Windows as the tests are always
-# run sequentially on that platform.)
. ./conf.sh
status=0
if [ "$NOPARALLEL" = "" ]; then
- if [ "$CYGWIN" = "" ]; then
- # Running on Unix, use "make" to run tests in parallel.
- make -j "$numproc" check
- status=$?
- else
- # Running on Windows: Cygwin "make" is available, but isn't being
- # used for the build. So we create a special makefile for the purpose
- # of parallel execution of system tests, and use that.
- $SHELL parallel.sh > parallel.mk
- make -f parallel.mk -j "$numproc" check
- $SHELL ./runsequential.sh
- $SHELL ./testsummary.sh || status=1
- fi
+ # use "make" to run tests in parallel.
+ make -j "$numproc" check
+ status=$?
else
# the NOPARALLEL environment variable indicates that tests must be
# run sequentially.
copy_setports ns2/named-alt7.conf.in ns2/named-alt7.conf
mkdir ns2/nope
-
-if [ 1 = "${CYGWIN:-0}" ]
-then
- setfacl -s user::r-x,group::r-x,other::r-x ns2/nope
-else
- chmod 555 ns2/nope
-fi
+chmod 555 ns2/nope
pid=$(cat "${pidfile}" 2>/dev/null)
if [ "${pid:+set}" = "set" ]; then
- $KILL -15 "${pid}" >/dev/null 2>&1
+ kill -15 "${pid}" >/dev/null 2>&1
retries=10
while [ "$retries" -gt 0 ]; do
- if ! $KILL -0 "${pid}" >/dev/null 2>&1; then
+ if ! kill -0 "${pid}" >/dev/null 2>&1; then
break
fi
sleep 1
)
check_pid() (
- return $(! $KILL -0 "${1}" >/dev/null 2>&1)
+ return $(! kill -0 "${1}" >/dev/null 2>&1)
)
status=0
test -n "$testpid" || ret=1
retry_quiet 10 check_named_log "another named process" ns2/named$n.run || ret=1
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
-test -n "$testpid" && $KILL -15 $testpid > kill$n.out 2>&1 && ret=1
+test -n "$testpid" && kill -15 $testpid > kill$n.out 2>&1 && ret=1
test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "verifying that named switches UID ($n)"
-if [ "$(id -u)" -eq 0 ] && [ -z "$CYGWIN" ]; then
+if [ "$(id -u)" -eq 0 ]; then
ret=0
TEMP_NAMED_DIR=$(mktemp -d "$(pwd)/ns2/tmp.XXXXXXXX")
if [ "$?" -eq 0 ]; then
(cd ../ns2 && $SHELL sign.sh )
-cp "../ns2/dsset-example$TP" .
+cp "../ns2/dsset-example." .
keyname=$($KEYGEN -q -a "${DEFAULT_ALGORITHM}" -b "${DEFAULT_BITS}" -n zone $zone)
$DIG $DIGOPTS a.example. @10.53.0.1 -b 10.53.0.1 >test1.dig
# Note that this can't use digcomp.pl because here, the ordering of the
# result RRs is significant.
-$DIFF test1.dig test1.good || status=1
+diff test1.dig test1.good || status=1
echo_i "test 1-element sortlist statement and undocumented BIND 8 features"
cat <<EOF >test2.good
(cd ../ns4 && $SHELL -e sign.sh )
-cp ../ns4/dsset-sub.example$TP .
+cp ../ns4/dsset-sub.example. .
keyname1=`$KEYGEN -q -a RSASHA256 -b 1024 -n zone $zone`
keyname2=`$KEYGEN -q -a RSASHA256 -b 2048 -f KSK -n zone $zone`
ret=0
echo_i "dumping initial stats for ns3 ($n)"
rndc_stats ns3 10.53.0.3 || ret=1
-if [ ! "$CYGWIN" ]; then
- nsock0nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
- [ 0 -ne ${nsock0nstat:-0} ] || ret=1
-fi
+nsock0nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
+[ 0 -ne ${nsock0nstat:-0} ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
status=`expr $status + $ret`
n=`expr $n + 1`
-if [ ! "$CYGWIN" ]; then
- ret=0
- echo_i "verifying active sockets output in named.stats ($n)"
- nsock1nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
- [ `expr ${nsock1nstat:-0} - ${nsock0nstat:-0}` -eq 1 ] || ret=1
- if [ $ret != 0 ]; then echo_i "failed"; fi
- status=`expr $status + $ret`
- n=`expr $n + 1`
-fi
+ret=0
+echo_i "verifying active sockets output in named.stats ($n)"
+nsock1nstat=`grep "UDP/IPv4 sockets active" $last_stats | awk '{print $1}'`
+[ `expr ${nsock1nstat:-0} - ${nsock0nstat:-0}` -eq 1 ] || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+n=`expr $n + 1`
# there should be 1 UDP and no TCP queries. As the TCP counter is zero
# no status line is emitted.
-o curl.out.${n}.xsl http://10.53.0.3:${EXTRAPORT1}/bind9.xsl 2>/dev/null || ret=1
time2=$($PERL -e 'print time(), "\n";')
test $((time2 - time1)) -lt 5 || ret=1
- ${DIFF} ${TOP_SRCDIR}/bin/named/bind9.xsl curl.out.${n}.xsl || ret=1
+ diff ${TOP_SRCDIR}/bin/named/bind9.xsl curl.out.${n}.xsl || ret=1
${XSLTPROC} curl.out.${n}.xsl - < curl.out.${n}.xml > xsltproc.out.${n} 2>/dev/null || ret=1
cp curl.out.${n}.xml stats.xml.out || ret=1
sub server_lock_file {
my ( $server ) = @_;
- return if (defined($ENV{'CYGWIN'}) && $ENV{'CYGWIN'});
-
return $testdir . "/" . $server . "/named.lock" if ($server =~ /^ns/);
return if ($server =~ /^ans/);
# If we're here, the PID file hasn't been cleaned up yet
if (send_signal(0, $pid) == 0) {
- # XXX: on windows this is likely to result in a
- # false positive, so don't bother reporting the error.
- if (!defined($ENV{'CYGWIN'}) || !$ENV{'CYGWIN'}) {
- print "I:$test:$server crashed on shutdown\n";
- $errors = 1;
- }
+ print "I:$test:$server crashed on shutdown\n";
+ $errors = 1;
return;
}
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 a$i.example a in > dig.out.$i.test$n || ret=1
- echo 10.0.0.1 | $DIFF - dig.out.$i.test$n || ret=1
+ echo 10.0.0.1 | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt in > dig.out.$i.test$n || ret=1
- echo '"hello"' | $DIFF - dig.out.$i.test$n || ret=1
+ echo '"hello"' | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 in > dig.out.$i.test$n || ret=1
- echo '\# 1 00' | $DIFF - dig.out.$i.test$n || ret=1
+ echo '\# 1 00' | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
echo_i "querying for NULL record ($n)"
ret=0
$DIG +short $DIGOPTS @10.53.0.1 null.example null in > dig.out.test$n || ret=1
-echo '\# 1 00' | $DIFF - dig.out.test$n || ret=1
+echo '\# 1 00' | diff - dig.out.test$n || ret=1
[ $ret = 0 ] || echo_i "failed"
status=`expr $status + $ret`
echo_i "querying for empty NULL record ($n)"
ret=0
$DIG +short $DIGOPTS @10.53.0.1 empty.example null in > dig.out.test$n || ret=1
-echo '\# 0' | $DIFF - dig.out.test$n || ret=1
+echo '\# 0' | diff - dig.out.test$n || ret=1
[ $ret = 0 ] || echo_i "failed"
status=`expr $status + $ret`
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 a$i.example a class10 > dig.out.$i.test$n || ret=1
- echo '\# 4 0A000001' | $DIFF - dig.out.$i.test$n || ret=1
+ echo '\# 4 0A000001' | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt class10 > dig.out.$i.test$n || ret=1
- echo '"hello"' | $DIFF - dig.out.$i.test$n || ret=1
+ echo '"hello"' | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
do
ret=0
$DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 class10 > dig.out.$i.test$n || ret=1
- echo '\# 1 00' | $DIFF - dig.out.$i.test$n || ret=1
+ echo '\# 1 00' | diff - dig.out.$i.test$n || ret=1
if [ $ret != 0 ]
then
echo_i "#$i failed"
for try in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS @10.53.0.1 +tcp +short large.example TYPE45234 > dig.out.$i.test$n || { ret=1 ; echo_i "dig failed" ; }
- $DIFF -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+ diff -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
[ "$ret" -eq 0 ] && break
sleep 1
done
for try in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out.$i.test$n || { ret=1 ; echo_i "dig failed" ; }
- $DIFF -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+ diff -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
[ "$ret" -eq 0 ] && break
sleep 1
done
for try in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out.$i.test$n || { ret=1 ; echo_i "dig failed" ; }
- $DIFF -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+ diff -s large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
[ "$ret" -eq 0 ] && break
sleep 1
done
echo_i "checking large unknown record loading on inline secondary ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out.test$n || { ret=1 ; echo_i "dig failed" ; }
-$DIFF large.out dig.out.test$n > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+diff large.out dig.out.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
[ $ret = 0 ] || echo_i "failed"
status=`expr $status + $ret`
for try in 0 1 2 3 4 5 6 7 8 9; do
ret=0
$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out.$i.test$n || { ret=1 ; echo_i "dig failed" ; }
- $DIFF large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+ diff large.out dig.out.$i.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
[ "$ret" -eq 0 ] && break
sleep 1
done
echo_i "check that '"'"\\#"'"' is not treated as the unknown escape sequence ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.1 +tcp +short txt8.example txt > dig.out.test$n
-echo '"#" "2" "0145"' | $DIFF - dig.out.test$n || ret=1
+echo '"#" "2" "0145"' | diff - dig.out.test$n || ret=1
[ $ret = 0 ] || echo_i "failed"
status=`expr $status + $ret`
echo_i "check that 'TXT \# text' is not treated as the unknown escape sequence ($n)"
ret=0
$DIG $DIGOPTS @10.53.0.1 +tcp +short txt9.example txt > dig.out.test$n
-echo '"#" "text"' | $DIFF - dig.out.test$n || ret=1
+echo '"#" "text"' | diff - dig.out.test$n || ret=1
[ $ret = 0 ] || echo_i "failed"
status=`expr $status + $ret`
infile=nsec.db.in
zonefile=nsec.db
outfile=nsec.db.signed
-dssets="$dssets dsset-${zone}${TP}"
+dssets="$dssets dsset-${zone}."
keyname1=`$KEYGEN -a RSASHA1 -b 1024 -n zone $zone 2> /dev/null`
keyname2=`$KEYGEN -f KSK -a RSASHA1 -b 1024 -n zone $zone 2> /dev/null`
infile=nsec3.db.in
zonefile=nsec3.db
outfile=nsec3.db.signed
-dssets="$dssets dsset-${zone}${TP}"
+dssets="$dssets dsset-${zone}."
keyname1=`$KEYGEN -a NSEC3RSASHA1 -b 1024 -n zone $zone 2> /dev/null`
keyname2=`$KEYGEN -f KSK -a NSEC3RSASHA1 -b 1024 -n zone $zone 2> /dev/null`
$DIG $DIGOPTS example. @10.53.0.8 axfr \
-y key1.:1234abcd8765 > dig.out.msgsize.test$n || status=1
-$DOS2UNIX dig.out.msgsize.test$n >/dev/null 2>&1
-
bytes=`wc -c < dig.out.msgsize.test$n`
if [ $bytes -ne 459357 ]; then
echo_i "failed axfr size check"
if [ $ticks = 1 ]; then
echo_i "Changing test zone..."
cp -f ns1/changing2.db ns1/changing.db
- if [ ! "$CYGWIN" ]; then
- $KILL -HUP `cat ns1/named.pid`
- else
- rndc_reload ns1 10.53.0.1
- fi
+ kill -HUP `cat ns1/named.pid`
fi
sleep 1
ticks=`expr $ticks + 1`