]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add sleeps so that the modification time changes
authorMark Andrews <marka@isc.org>
Wed, 2 Aug 2023 06:16:30 +0000 (16:16 +1000)
committerMark Andrews <marka@isc.org>
Mon, 14 Aug 2023 22:49:16 +0000 (22:49 +0000)
The mkeys system test could fail because root zone was resigned
within the same second as it was previously signed causing reloads
to fail.  Add delays to the test to prevent this.

bin/tests/system/mkeys/tests.sh

index 68757fa824450f5a3ff8c5be3f66aaf3c2ef4db8..bc2a59af355c757ca393568435925a93f3dfa2e9 100644 (file)
@@ -45,6 +45,7 @@ mkeys_resign_rootzone() (
        n=$1
        (
                cd ns1
+               sleep 1 # ensure modification time changes
                $SIGNER -PSg -N unixtime -o . root.db > signer.out.test$1 2>&1
        )
        nextpart ns1/named.run > /dev/null
@@ -477,6 +478,7 @@ ret=0
 $SETTIME -D none -R none -K ns1 "$original" > /dev/null
 $SETTIME -D now -K ns1 "$standby1" > /dev/null
 $SETTIME -D now -K ns1 "$standby2" > /dev/null
+sleep 1 # ensure modification time changes
 $SIGNER -Sg -K ns1 -N unixtime -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