From 28a893369070f96fb4d2d8b8fd17255b7c6dd479 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 17 Jun 2025 16:14:51 +1000 Subject: [PATCH] Use native shared library extension For most platforms this is ".so" but for Darwin it is ".dylib". --- bin/tests/system/conf.sh | 1 + bin/tests/system/dlzexternal/ns1/named.conf.in | 14 +++++++------- bin/tests/system/dyndb/ns1/named.conf.j2 | 4 ++-- bin/tests/system/filter-aaaa/conf/bad1.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/bad2.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/bad3.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/bad4.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/bad5.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/good1.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/good2.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/good3.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/good4.conf.in | 2 +- bin/tests/system/filter-aaaa/conf/good5.conf.in | 2 +- bin/tests/system/filter-aaaa/ns1/named1.conf.in | 2 +- bin/tests/system/filter-aaaa/ns1/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns2/named1.conf.in | 2 +- bin/tests/system/filter-aaaa/ns2/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns3/named1.conf.in | 2 +- bin/tests/system/filter-aaaa/ns3/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns4/named1.conf.in | 2 +- bin/tests/system/filter-aaaa/ns4/named2.conf.in | 2 +- bin/tests/system/filter-aaaa/ns5/named.conf.in | 2 +- bin/tests/system/hooks/ns1/named.conf.j2 | 2 +- bin/tests/system/isctest/vars/basic.py | 1 + bin/tests/system/rpz/ns3/named.conf.in | 2 +- 25 files changed, 32 insertions(+), 30 deletions(-) diff --git a/bin/tests/system/conf.sh b/bin/tests/system/conf.sh index dddf5dac20..ea61b6bbb2 100644 --- a/bin/tests/system/conf.sh +++ b/bin/tests/system/conf.sh @@ -538,6 +538,7 @@ copy_setports() { -e "s/@DISABLED_ALGORITHM_NUMBER@/${DISABLED_ALGORITHM_NUMBER}/g" \ -e "s/@DISABLED_ALGORITHM_NUMBER@/${DISABLED_ALGORITHM_DST_NUMBER}/g" \ -e "s/@DISABLED_BITS@/${DISABLED_BITS}/g" \ + -e "s/@DYLIB@/${DYLIB}/g" \ $1 >$2 } diff --git a/bin/tests/system/dlzexternal/ns1/named.conf.in b/bin/tests/system/dlzexternal/ns1/named.conf.in index 7e0234edeb..621b37a9bd 100644 --- a/bin/tests/system/dlzexternal/ns1/named.conf.in +++ b/bin/tests/system/dlzexternal/ns1/named.conf.in @@ -38,34 +38,34 @@ controls { }; dlz "example one" { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so example.nil"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ example.nil"; }; dlz "example two" { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so alternate.nil"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ alternate.nil"; }; dlz "example three" { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so example.org"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ example.org"; }; dlz "example four" { // Long zone name to trigger ISC_R_NOSPACE in dns_sdlz_putrr. - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so 123456789.123456789.123456789.123456789.123456789.example.foo"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ 123456789.123456789.123456789.123456789.123456789.example.foo"; }; dlz "unsearched1" { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so other.nil"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ other.nil"; search no; }; dlz "unsearched2" { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so zone.nil"; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ zone.nil"; search no; }; dlz redzone { - database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.so ."; + database "dlopen @TOP_BUILDDIR@/testlib-driver-dlzexternal.@DYLIB@ ."; search no; }; diff --git a/bin/tests/system/dyndb/ns1/named.conf.j2 b/bin/tests/system/dyndb/ns1/named.conf.j2 index a32c8474fe..8906cf2c68 100644 --- a/bin/tests/system/dyndb/ns1/named.conf.j2 +++ b/bin/tests/system/dyndb/ns1/named.conf.j2 @@ -36,5 +36,5 @@ controls { inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; }; }; -dyndb sample "@TOP_BUILDDIR@/testlib-driver-sample.so" { ipv4.example.nil. in-addr.arpa. }; -dyndb sample2 "@TOP_BUILDDIR@/testlib-driver-sample.so" { ipv6.example.nil. 8.b.d.0.1.0.0.2.ip6.arpa. }; +dyndb sample "@TOP_BUILDDIR@/testlib-driver-sample.@DYLIB@" { ipv4.example.nil. in-addr.arpa. }; +dyndb sample2 "@TOP_BUILDDIR@/testlib-driver-sample.@DYLIB@" { ipv6.example.nil. 8.b.d.0.1.0.0.2.ip6.arpa. }; diff --git a/bin/tests/system/filter-aaaa/conf/bad1.conf.in b/bin/tests/system/filter-aaaa/conf/bad1.conf.in index 7223efcf84..77daaaf29a 100644 --- a/bin/tests/system/filter-aaaa/conf/bad1.conf.in +++ b/bin/tests/system/filter-aaaa/conf/bad1.conf.in @@ -11,7 +11,7 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { none; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad2.conf.in b/bin/tests/system/filter-aaaa/conf/bad2.conf.in index 770227c454..a0a9e19ce5 100644 --- a/bin/tests/system/filter-aaaa/conf/bad2.conf.in +++ b/bin/tests/system/filter-aaaa/conf/bad2.conf.in @@ -11,7 +11,7 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { /* * While this matches the defaults, it is not a good configuration * to have in named.conf as the two options contradict each other diff --git a/bin/tests/system/filter-aaaa/conf/bad3.conf.in b/bin/tests/system/filter-aaaa/conf/bad3.conf.in index d8d30d18e8..fa7c598254 100644 --- a/bin/tests/system/filter-aaaa/conf/bad3.conf.in +++ b/bin/tests/system/filter-aaaa/conf/bad3.conf.in @@ -12,7 +12,7 @@ */ view myview { - plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { + plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 no; filter-aaaa { any; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad4.conf.in b/bin/tests/system/filter-aaaa/conf/bad4.conf.in index be198361ee..594b1d0a8a 100644 --- a/bin/tests/system/filter-aaaa/conf/bad4.conf.in +++ b/bin/tests/system/filter-aaaa/conf/bad4.conf.in @@ -12,7 +12,7 @@ */ view myview { - plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { + plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { none; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/bad5.conf.in b/bin/tests/system/filter-aaaa/conf/bad5.conf.in index e17f6a0cd4..fc70791d6c 100644 --- a/bin/tests/system/filter-aaaa/conf/bad5.conf.in +++ b/bin/tests/system/filter-aaaa/conf/bad5.conf.in @@ -11,7 +11,7 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good1.conf.in b/bin/tests/system/filter-aaaa/conf/good1.conf.in index 45efef7940..101eecd171 100644 --- a/bin/tests/system/filter-aaaa/conf/good1.conf.in +++ b/bin/tests/system/filter-aaaa/conf/good1.conf.in @@ -11,6 +11,6 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; }; diff --git a/bin/tests/system/filter-aaaa/conf/good2.conf.in b/bin/tests/system/filter-aaaa/conf/good2.conf.in index 351bedfd3a..dc44313175 100644 --- a/bin/tests/system/filter-aaaa/conf/good2.conf.in +++ b/bin/tests/system/filter-aaaa/conf/good2.conf.in @@ -11,6 +11,6 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 break-dnssec; }; diff --git a/bin/tests/system/filter-aaaa/conf/good3.conf.in b/bin/tests/system/filter-aaaa/conf/good3.conf.in index 559d98a6f0..d6226623cd 100644 --- a/bin/tests/system/filter-aaaa/conf/good3.conf.in +++ b/bin/tests/system/filter-aaaa/conf/good3.conf.in @@ -11,7 +11,7 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good4.conf.in b/bin/tests/system/filter-aaaa/conf/good4.conf.in index a9ee336fe1..ee99487e93 100644 --- a/bin/tests/system/filter-aaaa/conf/good4.conf.in +++ b/bin/tests/system/filter-aaaa/conf/good4.conf.in @@ -11,7 +11,7 @@ * information regarding copyright ownership. */ -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/conf/good5.conf.in b/bin/tests/system/filter-aaaa/conf/good5.conf.in index 4e568d7f5a..0c1706a5bb 100644 --- a/bin/tests/system/filter-aaaa/conf/good5.conf.in +++ b/bin/tests/system/filter-aaaa/conf/good5.conf.in @@ -12,7 +12,7 @@ */ view myview { - plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { + plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { 1.0.0.0/8; }; }; diff --git a/bin/tests/system/filter-aaaa/ns1/named1.conf.in b/bin/tests/system/filter-aaaa/ns1/named1.conf.in index 3a7338c580..8dea5f5d22 100644 --- a/bin/tests/system/filter-aaaa/ns1/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns1/named1.conf.in @@ -28,7 +28,7 @@ options { acl filterees { 10.53.0.1; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { filterees; }; }; diff --git a/bin/tests/system/filter-aaaa/ns1/named2.conf.in b/bin/tests/system/filter-aaaa/ns1/named2.conf.in index 6b421159ca..b03fda546a 100644 --- a/bin/tests/system/filter-aaaa/ns1/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns1/named2.conf.in @@ -26,7 +26,7 @@ options { }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v6 yes; filter-aaaa { fd92:7065:b8e:ffff::1; }; }; diff --git a/bin/tests/system/filter-aaaa/ns2/named1.conf.in b/bin/tests/system/filter-aaaa/ns2/named1.conf.in index cab026e949..c714c5429c 100644 --- a/bin/tests/system/filter-aaaa/ns2/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns2/named1.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 yes; filter-aaaa { 10.53.0.2; }; }; diff --git a/bin/tests/system/filter-aaaa/ns2/named2.conf.in b/bin/tests/system/filter-aaaa/ns2/named2.conf.in index abf5e7ce26..fc77fc4699 100644 --- a/bin/tests/system/filter-aaaa/ns2/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns2/named2.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v6 yes; filter-aaaa { fd92:7065:b8e:ffff::2; }; }; diff --git a/bin/tests/system/filter-aaaa/ns3/named1.conf.in b/bin/tests/system/filter-aaaa/ns3/named1.conf.in index 74534d3cf1..b11eea3dd9 100644 --- a/bin/tests/system/filter-aaaa/ns3/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns3/named1.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 10.53.0.3; }; }; diff --git a/bin/tests/system/filter-aaaa/ns3/named2.conf.in b/bin/tests/system/filter-aaaa/ns3/named2.conf.in index 7174067b23..5553e05b4d 100644 --- a/bin/tests/system/filter-aaaa/ns3/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns3/named2.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v6 break-dnssec; filter-aaaa { fd92:7065:b8e:ffff::3; }; }; diff --git a/bin/tests/system/filter-aaaa/ns4/named1.conf.in b/bin/tests/system/filter-aaaa/ns4/named1.conf.in index 6909d2221e..6d3a9cceee 100644 --- a/bin/tests/system/filter-aaaa/ns4/named1.conf.in +++ b/bin/tests/system/filter-aaaa/ns4/named1.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { 10.53.0.4; }; }; diff --git a/bin/tests/system/filter-aaaa/ns4/named2.conf.in b/bin/tests/system/filter-aaaa/ns4/named2.conf.in index cb2ea3be69..91e38533b2 100644 --- a/bin/tests/system/filter-aaaa/ns4/named2.conf.in +++ b/bin/tests/system/filter-aaaa/ns4/named2.conf.in @@ -25,7 +25,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v6 break-dnssec; filter-aaaa { fd92:7065:b8e:ffff::4; }; }; diff --git a/bin/tests/system/filter-aaaa/ns5/named.conf.in b/bin/tests/system/filter-aaaa/ns5/named.conf.in index 2dad6434a0..58acd797ea 100644 --- a/bin/tests/system/filter-aaaa/ns5/named.conf.in +++ b/bin/tests/system/filter-aaaa/ns5/named.conf.in @@ -30,7 +30,7 @@ options { minimal-responses no; }; -plugin query "@TOP_BUILDDIR@/filter-aaaa.so" { +plugin query "@TOP_BUILDDIR@/filter-aaaa.@DYLIB@" { filter-aaaa-on-v4 break-dnssec; filter-aaaa { any; }; }; diff --git a/bin/tests/system/hooks/ns1/named.conf.j2 b/bin/tests/system/hooks/ns1/named.conf.j2 index 500ede379d..0cc4387cf1 100644 --- a/bin/tests/system/hooks/ns1/named.conf.j2 +++ b/bin/tests/system/hooks/ns1/named.conf.j2 @@ -25,7 +25,7 @@ options { }; -plugin query "@TOP_BUILDDIR@/testlib-driver-async.so"; +plugin query "@TOP_BUILDDIR@/testlib-driver-async.@DYLIB@"; key rndc_key { secret "1234abcd8765"; diff --git a/bin/tests/system/isctest/vars/basic.py b/bin/tests/system/isctest/vars/basic.py index 4371694c6d..690088c3c0 100644 --- a/bin/tests/system/isctest/vars/basic.py +++ b/bin/tests/system/isctest/vars/basic.py @@ -61,4 +61,5 @@ BASIC_VARS = { ), "LC_ALL": "C", "ANS_LOG_LEVEL": "debug", + "DYLIB": ("dylib" if os.uname().sysname == "Darwin" else "so"), } diff --git a/bin/tests/system/rpz/ns3/named.conf.in b/bin/tests/system/rpz/ns3/named.conf.in index 672ba05f21..cfb66cfea8 100644 --- a/bin/tests/system/rpz/ns3/named.conf.in +++ b/bin/tests/system/rpz/ns3/named.conf.in @@ -157,5 +157,5 @@ zone "static-stub-nomatch." { # The "BAD" comments below are necessary, because they will be removed using # 'sed' by tests.sh in order to activate the faulty configuration. #BAD dlz "bad-dlz" { -#BAD database "dlopen bad-dlz.so example.org"; +#BAD database "dlopen bad-dlz.@DYLIB@ example.org"; #BAD };