]> 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 10:44:27 +0000 (12:44 +0200)
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 cdfd5b7aff0a2eb4055769dbfa52207950a6a775..dd116d5675041956bcd6d42c7f097fb92e574463 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 4102466fde7cc2bbb0275bf0c595772401ac3b72..3cd660433e3477064f878fa92567605dc1822ca3 100644 (file)
@@ -425,8 +425,8 @@ signedfile="upper.example.db.signed"
 kskname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 $zone`
 zskname=`$KEYGEN -q -r $RANDFILE -a RSASHA1 -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 -a RSASHA1 -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 4f7e1623324e1f750cdbd802e390724bdb5e3519..d49ddc204093e5df1b355049072f2f8c51dafb2d 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 7edcd4b1b786900e4e5dca36ea19822950d43e55..9812a8238b9da905c21faca6e151352ba75577da 100644 (file)
@@ -18,7 +18,7 @@ zonefile=root.db
 keyname=`$KEYGEN -a rsasha256 -qfk -r $RANDFILE $zone`
 zskkeyname=`$KEYGEN -a rsasha256 -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 ae07d76bc2d4f569968d0d176b917b85cc3f843a..760bda63b25cbe4e85f410869e8b13e0f7465f50 100644 (file)
@@ -474,7 +474,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
@@ -508,7 +508,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
@@ -560,7 +560,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
@@ -650,7 +650,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 15b0efc9837338baca5ebe21f4591fcc3187aa9a..ae12a4c17dc0dd7302a31ceca517bce2d1076ffa 100644 (file)
@@ -38,7 +38,7 @@ czsk5=`$KEYGEN -q -a rsasha1 -r $RANDFILE -P now+12h -A now+12h -I now+24h $czon
 
 # 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 -a rsasha1 -r $RANDFILE -fk -L 30 $czone`