]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update tests to not use '>&-' that closes file descriptor, but instead use correct...
authorOndřej Surý <ondrej@sury.org>
Tue, 24 Apr 2018 18:58:58 +0000 (20:58 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 11 May 2018 11:11:20 +0000 (13:11 +0200)
(cherry picked from commit 3f66b8acb04ddceaa9ed34117ada8e01e85a1bc5)

Makefile.in
bin/tests/system/dnssec/ns3/sign.sh
bin/tests/system/dnssec/tests.sh
bin/tests/system/mkeys/ns1/sign.sh
bin/tests/system/mkeys/tests.sh
bin/tests/system/smartsign/tests.sh

index af0dfd6bd4c9122bd834df765fa30204f88805bf..f9d160e80e02a59f1af79b40961b74874ed5b252 100644 (file)
@@ -74,7 +74,7 @@ tags:
        find lib bin -name "*.[ch]" -print | @ETAGS@ -
 
 test check:
-       @if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>&- || echo fail`"; then \
+       @if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
        echo I: NOTE: The tests were not run because they require that; \
        echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
        echo I: as alias addresses on the loopback interface.  Please run; \
index 18ea0cadb3cf21cdbe1883e630ec6cedaca84da7..330abf7febf1712380cec5e34acff7cf2ec96d87 100644 (file)
@@ -425,8 +425,8 @@ signedfile="upper.example.db.signed"
 kskname=`$KEYGEN -q -r $RANDFILE $zone`
 zskname=`$KEYGEN -q -r $RANDFILE -f KSK $zone`
 cp $infile $zonefile
-$SIGNER -P -S -r $RANDFILE -o $zone -f $lower $zonefile > /dev/null 2>&1
-$CHECKZONE -D upper.example $lower 2>&- | \
+$SIGNER -P -S -r $RANDFILE -o $zone -f $lower $zonefile > /dev/null 2>/dev/null
+$CHECKZONE -D upper.example $lower 2>/dev/null | \
        sed '/RRSIG/s/ upper.example. / UPPER.EXAMPLE. /' > $signedfile
 
 #
@@ -455,7 +455,7 @@ zskname=`$KEYGEN -q -r $RANDFILE -f KSK $zone`
 cp $infile $zonefile
 $SIGNER -S -r $RANDFILE -e now+1mi -o $zone $zonefile > /dev/null 2>&1
 # preserve a normalized copy of the NS RRSIG for comparison later
-$CHECKZONE -D nosign.example nosign.example.db.signed 2>&- | \
+$CHECKZONE -D nosign.example nosign.example.db.signed 2>/dev/null | \
         awk '$4 == "RRSIG" && $5 == "NS" {$2 = ""; print}' | \
         sed 's/[       ][      ]*/ /g'> ../nosign.before
 
index 2e3c403c76ac1eb39a23b9500326fe000c87a217..8c00a91d23b20b38614f040b845d17784b3f3b7c 100644 (file)
@@ -42,7 +42,7 @@ showprivate () {
 checkprivate () {
     ret=0
     x=`showprivate "$@"`
-    echo $x | grep incomplete >&- 2>&- && ret=1
+    echo $x | grep incomplete >/dev/null 2>&1 && ret=1
     [ $ret = 1 ] && {
         echo "$x"
         echo_i "failed"
index fc557926e12840bbd620b7fe13c7dec820f1fd7a..f109b951e7c040e2ac3ab36f126333cb97c6f70f 100644 (file)
@@ -18,7 +18,7 @@ zonefile=root.db
 keyname=`$KEYGEN -qfk -r $RANDFILE $zone`
 zskkeyname=`$KEYGEN -q -r $RANDFILE $zone`
 
-$SIGNER -Sg -r $RANDFILE -o $zone $zonefile > /dev/null 2>&-
+$SIGNER -Sg -r $RANDFILE -o $zone $zonefile > /dev/null 2>/dev/null
 
 # Configure the resolving server with a managed trusted key.
 cat $keyname.key | grep -v '^; ' | $PERL -n -e '
index e3963d04095303565f85c44e6cf861fe79473185..f42b7bf8d431f319708cd4694fc36602b060873e 100644 (file)
@@ -445,7 +445,7 @@ echo_i "reset the root server"
 $SETTIME -D none -R none -K ns1 `cat ns1/managed.key` > /dev/null
 $SETTIME -D now -K ns1 $standby1 > /dev/null
 $SETTIME -D now -K ns1 $standby2 > /dev/null
-$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>&-
+$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>/dev/null
 copy_setports ns1/named2.conf.in ns1/named.conf
 rm -f ns1/root.db.signed.jnl
 mkeys_reconfig_on 1
@@ -479,7 +479,7 @@ rm -f ns1/root.db.signed.jnl
 # but we actually do want post-sign verification to happen to ensure the zone
 # is correct before we break it on purpose.
 $SETTIME -R none -D none -K ns1 $standby1 > /dev/null
-$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -O full -o . -f signer.out.$n ns1/root.db > /dev/null 2>&-
+$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -O full -o . -f signer.out.$n ns1/root.db > /dev/null 2>/dev/null
 cp -f ns1/root.db.signed ns1/root.db.tmp
 BADSIG="SVn2tLDzpNX2rxR4xRceiCsiTqcWNKh7NQ0EQfCrVzp9WEmLw60sQ5kP xGk4FS/xSKfh89hO2O/H20Bzp0lMdtr2tKy8IMdU/mBZxQf2PXhUWRkg V2buVBKugTiOPTJSnaqYCN3rSfV1o7NtC1VNHKKK/D5g6bpDehdn5Gaq kpBhN+MSCCh9OZP2IT20luS1ARXxLlvuSVXJ3JYuuhTsQXUbX/SQpNoB Lo6ahCE55szJnmAxZEbb2KOVnSlZRA6ZBHDhdtO0S4OkvcmTutvcVV+7 w53CbKdaXhirvHIh0mZXmYk2PbPLDY7PU9wSH40UiWPOB9f00wwn6hUe uEQ1Qg=="
 # Less than a second may have passed since ns1 was started.  If we call
@@ -531,7 +531,7 @@ $SETTIME -D now -K ns1 $standby1 > /dev/null
 # "nanoseconds" field of isc_time_t, due to zone load time being seemingly
 # equal to master file modification time.
 sleep 1
-$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>&-
+$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>/dev/null
 mkeys_reload_on 1
 mkeys_flush_on 2
 $DIG $DIGOPTS +noauth example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
@@ -621,7 +621,7 @@ n=`expr $n + 1`
 echo_i "restore root server, check validation succeeds again ($n)"
 ret=0
 rm -f ns1/root.db.signed.jnl
-$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>&-
+$SIGNER -Sg -K ns1 -N unixtime -r $RANDFILE -o . ns1/root.db > /dev/null 2>/dev/null
 mkeys_reload_on 1
 mkeys_refresh_on 2
 mkeys_status_on 2 > rndc.out.$n 2>&1
index 18eca9e6c30206041035ac10ec543fb0e8589d1b..547f2bfc0bc0821a5f0f7a0f8440dd697dd12be3 100644 (file)
@@ -38,7 +38,7 @@ czsk5=`$KEYGEN -q -r $RANDFILE -P now+12h -A now+12h -I now+24h $czone`
 
 # explicit successor to czk5
 # (suppressing warning about lack of removal date)
-czsk6=`$KEYGEN -q -r $RANDFILE -S $czsk5 -i 6h 2>&-
+czsk6=`$KEYGEN -q -r $RANDFILE -S $czsk5 -i 6h 2>/dev/null
 
 # active ksk
 cksk1=`$KEYGEN -q -r $RANDFILE -fk -L 30 $czone`