Fix some tests conditionals

This commit is contained in:
Petr Menšík 2022-09-12 10:43:01 +02:00
parent a912dbe98b
commit 99f74efbdc

View File

@ -1,4 +1,4 @@
From 8bbfacc1a90301a71a487e776db071fa2ef6c8dd Mon Sep 17 00:00:00 2001 From 09030b066846a9b7252b5cb4f483d4a55b4639fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Thu, 2 Aug 2018 23:46:45 +0200 Date: Thu, 2 Aug 2018 23:46:45 +0200
Subject: [PATCH] FIPS tests changes Subject: [PATCH] FIPS tests changes
@ -85,11 +85,13 @@ Date: Wed Mar 7 10:44:23 2018 +0100
bin/tests/system/rndc/setup.sh | 2 +- bin/tests/system/rndc/setup.sh | 2 +-
bin/tests/system/rndc/tests.sh | 22 +++--- bin/tests/system/rndc/tests.sh | 22 +++---
bin/tests/system/tsig/ns1/named.conf.in | 10 +-- bin/tests/system/tsig/ns1/named.conf.in | 10 +--
bin/tests/system/tsig/ns1/rndc5.conf.in | 10 +++
bin/tests/system/tsig/setup.sh | 5 ++ bin/tests/system/tsig/setup.sh | 5 ++
bin/tests/system/tsig/tests.sh | 67 ++++++++++++------- bin/tests/system/tsig/tests.sh | 67 ++++++++++++-------
bin/tests/system/upforwd/ns1/named.conf.in | 2 +- bin/tests/system/upforwd/ns1/named.conf.in | 2 +-
bin/tests/system/upforwd/tests.sh | 2 +- bin/tests/system/upforwd/tests.sh | 2 +-
31 files changed, 149 insertions(+), 106 deletions(-) 32 files changed, 159 insertions(+), 106 deletions(-)
create mode 100644 bin/tests/system/tsig/ns1/rndc5.conf.in
diff --git a/bin/tests/system/acl/ns2/named1.conf.in b/bin/tests/system/acl/ns2/named1.conf.in diff --git a/bin/tests/system/acl/ns2/named1.conf.in b/bin/tests/system/acl/ns2/named1.conf.in
index 745048a..93cb411 100644 index 745048a..93cb411 100644
@ -193,7 +195,7 @@ index f43f33c..f4a865a 100644
}; };
diff --git a/bin/tests/system/acl/tests.sh b/bin/tests/system/acl/tests.sh diff --git a/bin/tests/system/acl/tests.sh b/bin/tests/system/acl/tests.sh
index 9ee3984..f7d4388 100644 index ad98fa1..7a7ff4a 100644
--- a/bin/tests/system/acl/tests.sh --- a/bin/tests/system/acl/tests.sh
+++ b/bin/tests/system/acl/tests.sh +++ b/bin/tests/system/acl/tests.sh
@@ -23,14 +23,14 @@ echo_i "testing basic ACL processing" @@ -23,14 +23,14 @@ echo_i "testing basic ACL processing"
@ -513,10 +515,10 @@ index bbffe07..80da0fe 100644
grep 'EDE: 18 (Prohibited)' dig.out.ns2.$n > /dev/null || ret=1 grep 'EDE: 18 (Prohibited)' dig.out.ns2.$n > /dev/null || ret=1
grep '^a.keydisallow.example' dig.out.ns2.$n > /dev/null && ret=1 grep '^a.keydisallow.example' dig.out.ns2.$n > /dev/null && ret=1
diff --git a/bin/tests/system/catz/ns1/named.conf.in b/bin/tests/system/catz/ns1/named.conf.in diff --git a/bin/tests/system/catz/ns1/named.conf.in b/bin/tests/system/catz/ns1/named.conf.in
index 5a46d39..fc1bd07 100644 index 1421281..424afb8 100644
--- a/bin/tests/system/catz/ns1/named.conf.in --- a/bin/tests/system/catz/ns1/named.conf.in
+++ b/bin/tests/system/catz/ns1/named.conf.in +++ b/bin/tests/system/catz/ns1/named.conf.in
@@ -63,5 +63,5 @@ zone "catalog4.example" { @@ -122,5 +122,5 @@ view "ch" ch {
key tsig_key. { key tsig_key. {
secret "LSAnCU+Z"; secret "LSAnCU+Z";
@ -549,10 +551,10 @@ index 897dc86..e4b6dc1 100644
secret "qwertyuiopasdfgh"; secret "qwertyuiopasdfgh";
}; };
diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c
index 30e6e14..ba7f98e 100644 index 3435c91..aaaa264 100644
--- a/bin/tests/system/feature-test.c --- a/bin/tests/system/feature-test.c
+++ b/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c
@@ -16,6 +16,7 @@ @@ -17,6 +17,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
@ -560,7 +562,7 @@ index 30e6e14..ba7f98e 100644
#include <isc/net.h> #include <isc/net.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/util.h> #include <isc/util.h>
@@ -140,6 +141,19 @@ main(int argc, char **argv) { @@ -133,6 +134,19 @@ main(int argc, char **argv) {
#endif #endif
} }
@ -606,10 +608,10 @@ index 5cab276..d4a7bf3 100644
}; };
diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh
index 52d2f81..1fd02d4 100644 index 04fd34b..e5476ea 100644
--- a/bin/tests/system/notify/tests.sh --- a/bin/tests/system/notify/tests.sh
+++ b/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh
@@ -187,7 +187,7 @@ test_start "checking notify to multiple views using tsig" @@ -179,7 +179,7 @@ test_start "checking notify to multiple views using tsig"
$NSUPDATE << EOF $NSUPDATE << EOF
server 10.53.0.5 ${PORT} server 10.53.0.5 ${PORT}
zone x21 zone x21
@ -618,7 +620,7 @@ index 52d2f81..1fd02d4 100644
update add added.x21 0 in txt "test string" update add added.x21 0 in txt "test string"
send send
EOF EOF
@@ -195,9 +195,9 @@ fnb="dig.out.b.ns5.test$n" @@ -187,9 +187,9 @@ fnb="dig.out.b.ns5.test$n"
fnc="dig.out.c.ns5.test$n" fnc="dig.out.c.ns5.test$n"
for i in 1 2 3 4 5 6 7 8 9 for i in 1 2 3 4 5 6 7 8 9
do do
@ -716,7 +718,7 @@ index 4dd6fa7..1b79263 100644
make_key 3 ${EXTRAPORT3} hmac-sha224 make_key 3 ${EXTRAPORT3} hmac-sha224
make_key 4 ${EXTRAPORT4} hmac-sha256 make_key 4 ${EXTRAPORT4} hmac-sha256
diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh
index 85c271b..ac69f32 100644 index e678153..e7ec855 100644
--- a/bin/tests/system/rndc/tests.sh --- a/bin/tests/system/rndc/tests.sh
+++ b/bin/tests/system/rndc/tests.sh +++ b/bin/tests/system/rndc/tests.sh
@@ -350,15 +350,19 @@ if [ $ret != 0 ]; then echo_i "failed"; fi @@ -350,15 +350,19 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
@ -732,7 +734,7 @@ index 85c271b..ac69f32 100644
-done -done
-if [ $ret != 0 ]; then echo_i "failed"; fi -if [ $ret != 0 ]; then echo_i "failed"; fi
-status=$((status+ret)) -status=$((status+ret))
+if $FEATURETEST --md5 +if $FEATURETEST --md5; then
+ echo_i "testing rndc with hmac-md5 ($n)" + echo_i "testing rndc with hmac-md5 ($n)"
+ ret=0 + ret=0
+ $RNDC -s 10.53.0.4 -p ${EXTRAPORT1} -c ns4/key1.conf status > /dev/null 2>&1 || ret=1 + $RNDC -s 10.53.0.4 -p ${EXTRAPORT1} -c ns4/key1.conf status > /dev/null 2>&1 || ret=1
@ -776,6 +778,22 @@ index 76cf970..22637af 100644
key "sha1-trunc" { key "sha1-trunc" {
secret "FrSt77yPTFx6hTs4i2tKLB9LmE0="; secret "FrSt77yPTFx6hTs4i2tKLB9LmE0=";
diff --git a/bin/tests/system/tsig/ns1/rndc5.conf.in b/bin/tests/system/tsig/ns1/rndc5.conf.in
new file mode 100644
index 0000000..0682194
--- /dev/null
+++ b/bin/tests/system/tsig/ns1/rndc5.conf.in
@@ -0,0 +1,10 @@
+# Conditionally included when support for MD5 is available
+key "md5" {
+ secret "97rnFx24Tfna4mHPfgnerA==";
+ algorithm hmac-md5;
+};
+
+key "md5-trunc" {
+ secret "97rnFx24Tfna4mHPfgnerA==";
+ algorithm hmac-md5-80;
+};
diff --git a/bin/tests/system/tsig/setup.sh b/bin/tests/system/tsig/setup.sh diff --git a/bin/tests/system/tsig/setup.sh b/bin/tests/system/tsig/setup.sh
index 34cc73b..d51ff21 100644 index 34cc73b..d51ff21 100644
--- a/bin/tests/system/tsig/setup.sh --- a/bin/tests/system/tsig/setup.sh
@ -908,5 +926,5 @@ index a6de312..ebcadb1 100644
update add updated.example. 600 A 10.10.10.1 update add updated.example. 600 A 10.10.10.1
update add updated.example. 600 TXT Foo update add updated.example. 600 TXT Foo
-- --
2.34.1 2.37.3