From 922bba7fa03de9293eb698f4d9f671ac9ca34dce Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Fri, 11 Apr 2014 20:02:43 +0200 Subject: [PATCH] make more tests pass on osx by improving script portability --- regression-tests/tests/basic-aaaa-resolution/command | 2 +- regression-tests/tests/ent-axfr/command | 2 +- .../tests/too-big-for-udp-query-no-truncate-additional/command | 2 +- regression-tests/tests/too-big-for-udp-query/command | 2 +- regression-tests/tests/verify-dnssec-zone/command | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/regression-tests/tests/basic-aaaa-resolution/command b/regression-tests/tests/basic-aaaa-resolution/command index 635329ad90..a796c6bbd7 100755 --- a/regression-tests/tests/basic-aaaa-resolution/command +++ b/regression-tests/tests/basic-aaaa-resolution/command @@ -1,3 +1,3 @@ #!/bin/sh -cleandig ipv6.example.com AAAA +cleandig ipv6.example.com AAAA | perl -pe 's/2001:6a8::1:210:4bff:fe4b:4c61/2001:6a8:0:1:210:4bff:fe4b:4c61/' diff --git a/regression-tests/tests/ent-axfr/command b/regression-tests/tests/ent-axfr/command index a7079b6aa8..d37bbe8be9 100755 --- a/regression-tests/tests/ent-axfr/command +++ b/regression-tests/tests/ent-axfr/command @@ -1,2 +1,2 @@ #!/bin/sh -cleandig test.com AXFR showdetails | grep -P 'IN\tNSEC' \ No newline at end of file +cleandig test.com AXFR showdetails | perl -ne 'print if /IN\tNSEC/' diff --git a/regression-tests/tests/too-big-for-udp-query-no-truncate-additional/command b/regression-tests/tests/too-big-for-udp-query-no-truncate-additional/command index f918d86347..74211c62db 100755 --- a/regression-tests/tests/too-big-for-udp-query-no-truncate-additional/command +++ b/regression-tests/tests/too-big-for-udp-query-no-truncate-additional/command @@ -1,3 +1,3 @@ #!/bin/sh -cleandig together-too-much.example.com MX | sed 's/\(19[23]\.168\.99\.\)[0-9]\+/\1/' | sed 's/toomuchinfo-[ab]/toomuchinfo-X/' +cleandig together-too-much.example.com MX | perl -pe 's/(192\.168\.99\.)[0-9]+/$1/; s/toomuchinfo-[ab]/toomuchinfo-X/;' diff --git a/regression-tests/tests/too-big-for-udp-query/command b/regression-tests/tests/too-big-for-udp-query/command index 34000a5ad8..35a6678226 100755 --- a/regression-tests/tests/too-big-for-udp-query/command +++ b/regression-tests/tests/too-big-for-udp-query/command @@ -1,3 +1,3 @@ #!/bin/sh -cleandig toomuchinfo-b.example.com A | sed 's/\(192\.168\.99\.\)[0-9]\+/\1/' +cleandig toomuchinfo-b.example.com A | perl -pe 's/(192\.168\.99\.)[0-9]+/$1/' diff --git a/regression-tests/tests/verify-dnssec-zone/command b/regression-tests/tests/verify-dnssec-zone/command index f9c11a7143..b446e0f39e 100755 --- a/regression-tests/tests/verify-dnssec-zone/command +++ b/regression-tests/tests/verify-dnssec-zone/command @@ -1,7 +1,7 @@ #!/usr/bin/env bash for zone in $(grep 'zone ' named.conf | cut -f2 -d\" | grep -v '^\(example.com\|nztest.com\)$') do - TFILE=$(mktemp) + TFILE=$(mktemp tmp.XXXXXXXXXX) dig axfr $zone @$nameserver -p $port | ldns-read-zone -z > $TFILE for validator in "ldns-verify-zone -V2" validns jdnssec-verifyzone named-checkzone do -- 2.47.2