]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove remnants of Windows support in system test
authorMichal Nowak <mnowak@isc.org>
Mon, 17 Jul 2023 16:33:50 +0000 (18:33 +0200)
committerMichal Nowak <mnowak@isc.org>
Tue, 18 Jul 2023 14:39:21 +0000 (16:39 +0200)
The "uname -o" command is harmful on OpenBSD because this platform does
not know about the "-o" option. It is a permanent failure since system
tests are started with "set -e".

bin/tests/system/ifconfig.sh.in
bin/tests/system/metadata/tests.sh
bin/tests/system/stop.pl

index 298bd3f041d3ec7b845bdc019cf1d0957d9522e9..ed84fd19d78ab4b7cdca75935e21dfed9bf6e56f 100755 (executable)
@@ -123,10 +123,6 @@ up() {
                [ "$a" ] && ifconfig lo0 alias $a
                [ "$aaaa" ] && ifconfig lo0 inet6 $aaaa alias
                ;;
-           *-cygwin*)
-               echo "Please run ifconfig.bat as Administrator."
-               exit 1
-               ;;
            *)
                echo "Don't know how to set up interface.  Giving up."
                exit 1
@@ -211,10 +207,6 @@ down() {
                [ "$a" ] && ifconfig lo0 -alias $a
                [ "$aaaa" ] && ifconfig lo0 inet6 $aaaa delete
                ;;
-           *-cygwin*)
-               echo "Please run ifconfig.bat as Administrator."
-               exit 1
-               ;;
            *)
                echo "Don't know how to destroy interface.  Giving up."
                exit 1
index 38141b27a1886de45d4cf250a46add57a65cf2e6..3a91bb783e4d459e0e7db62050cc191bc83b7601 100644 (file)
@@ -139,21 +139,16 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
 echo_i "checking warning about permissions change on key with dnssec-settime ($n)"
-uname=$(uname -o 2> /dev/null)
-if [ Cygwin = "$uname"  ]; then
-       echo_i "Cygwin detected, skipping"
-else
-       ret=0
-       # settime should print a warning about changing the permissions
-       chmod 644 $(cat oldstyle.key).private
-       $SETTIME -P none $(cat oldstyle.key) > settime1.test$n 2>&1 || ret=1
-       grep "warning: Permissions on the file.*have changed" settime1.test$n > /dev/null 2>&1 || ret=1
-       $SETTIME -P none $(cat oldstyle.key) > settime2.test$n 2>&1 || ret=1
-       grep "warning: Permissions on the file.*have changed" settime2.test$n > /dev/null 2>&1 && ret=1
-       n=$((n + 1))
-       if [ $ret != 0 ]; then echo_i "failed"; fi
-       status=$((status + ret))
-fi
+ret=0
+# settime should print a warning about changing the permissions
+chmod 644 $(cat oldstyle.key).private
+$SETTIME -P none $(cat oldstyle.key) > settime1.test$n 2>&1 || ret=1
+grep "warning: Permissions on the file.*have changed" settime1.test$n > /dev/null 2>&1 || ret=1
+$SETTIME -P none $(cat oldstyle.key) > settime2.test$n 2>&1 || ret=1
+grep "warning: Permissions on the file.*have changed" settime2.test$n > /dev/null 2>&1 && ret=1
+n=$((n + 1))
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
 
 echo_i "checking warning about delete date < inactive date with dnssec-settime ($n)"
 ret=0
index cb35af3afd99a116f0b83972f771c40c344f7759..8fa1d4236ed6c9b54f3aca47804df5e2985f72c3 100644 (file)
@@ -214,13 +214,7 @@ sub send_signal {
 
        my $result = 0;
 
-       if (!$ans && ($^O eq 'cygwin' || $^O eq 'msys')) {
-               my $killout = `/bin/kill -f -$signal $pid 2>&1`;
-               chomp($killout);
-               $result = 1 if ($killout eq '');
-       } else {
-               $result = kill $signal, $pid;
-       }
+       $result = kill $signal, $pid;
        return $result;
 }