From: Mark Andrews Date: Wed, 30 Jul 2025 05:22:05 +0000 (+1000) Subject: Add tests for BRID and HHIT X-Git-Tag: v9.21.12~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92621e63909795af815b1ff4447ff6f79fbbf0bc;p=thirdparty%2Fbind9.git Add tests for BRID and HHIT --- diff --git a/bin/tests/system/doth/example.axfr.good b/bin/tests/system/doth/example.axfr.good index 4561d59b1e2..d9e3cbf68ec 100644 --- a/bin/tests/system/doth/example.axfr.good +++ b/bin/tests/system/doth/example.axfr.good @@ -2524,6 +2524,7 @@ biganswer.example. 3600 IN A 10.10.50.47 biganswer.example. 3600 IN A 10.10.50.48 biganswer.example. 3600 IN A 10.10.50.49 biganswer.example. 3600 IN A 10.10.50.50 +brid.example. 3600 IN BRID abcd caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa02.example. 3600 IN CAA 128 tbs "Unknown" caa03.example. 3600 IN CAA 128 tbs "" @@ -2555,6 +2556,7 @@ eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef gid01.example. 3600 IN GID \# 1 03 gpos01.example. 3600 IN GPOS "-22.6882" "116.8652" "250.0" gpos02.example. 3600 IN GPOS "" "" "" +hhit.example. 3600 IN HHIT abcd hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" hinfo02.example. 3600 IN HINFO "PC" "NetBSD" hip1.example. 3600 IN HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D diff --git a/bin/tests/system/doth/example8.axfr.good b/bin/tests/system/doth/example8.axfr.good index 3e20efe43de..445653f394b 100644 --- a/bin/tests/system/doth/example8.axfr.good +++ b/bin/tests/system/doth/example8.axfr.good @@ -2524,6 +2524,7 @@ biganswer.example8. 3600 IN A 10.10.50.47 biganswer.example8. 3600 IN A 10.10.50.48 biganswer.example8. 3600 IN A 10.10.50.49 biganswer.example8. 3600 IN A 10.10.50.50 +brid.example8. 3600 IN BRID abcd caa01.example8. 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa02.example8. 3600 IN CAA 128 tbs "Unknown" caa03.example8. 3600 IN CAA 128 tbs "" @@ -2555,6 +2556,7 @@ eui64.example8. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef gid01.example8. 3600 IN GID \# 1 03 gpos01.example8. 3600 IN GPOS "-22.6882" "116.8652" "250.0" gpos02.example8. 3600 IN GPOS "" "" "" +hhit.example8. 3600 IN HHIT abcd hinfo01.example8. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" hinfo02.example8. 3600 IN HINFO "PC" "NetBSD" hip1.example8. 3600 IN HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D diff --git a/bin/tests/system/genzone.sh b/bin/tests/system/genzone.sh index 4920bc5c91f..6762efd290f 100644 --- a/bin/tests/system/genzone.sh +++ b/bin/tests/system/genzone.sh @@ -392,7 +392,13 @@ https1 HTTPS 1 . port=60 ; type 66 dsync01 DSYNC CDS NOTIFY 53 . -; type 68 -- 98 (unassigned) +; type 67 +hhit HHIT abcd + +; type 68 +brid BRID abcd + +; type 69 -- 98 (unassigned) ; type 99 spf01 SPF "v=spf1 -all" diff --git a/bin/tests/system/xfer/dig1.good b/bin/tests/system/xfer/dig1.good index 4cad0c9f025..dd0feed7538 100644 --- a/bin/tests/system/xfer/dig1.good +++ b/bin/tests/system/xfer/dig1.good @@ -25,6 +25,7 @@ atma02.example. 3600 IN ATMA +61200000000 atma03.example. 3600 IN ATMA 1234567890abcdef atma04.example. 3600 IN ATMA fedcba0987654321 avc.example. 3600 IN AVC "foo:bar" +brid.example. 3600 IN BRID abcd caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa02.example. 3600 IN CAA 128 tbs "Unknown" caa03.example. 3600 IN CAA 128 tbs "" @@ -56,6 +57,7 @@ eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef gid01.example. 3600 IN GID \# 1 03 gpos01.example. 3600 IN GPOS "-22.6882" "116.8652" "250.0" gpos02.example. 3600 IN GPOS "" "" "" +hhit.example. 3600 IN HHIT abcd hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" hinfo02.example. 3600 IN HINFO "PC" "NetBSD" hip1.example. 3600 IN HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D diff --git a/bin/tests/system/xfer/dig2.good b/bin/tests/system/xfer/dig2.good index 795381be59d..880368c6039 100644 --- a/bin/tests/system/xfer/dig2.good +++ b/bin/tests/system/xfer/dig2.good @@ -25,6 +25,7 @@ atma02.example. 3600 IN ATMA +61200000000 atma03.example. 3600 IN ATMA 1234567890abcdef atma04.example. 3600 IN ATMA fedcba0987654321 avc.example. 3600 IN AVC "foo:bar" +brid.example. 3600 IN BRID abcd caa01.example. 3600 IN CAA 0 issue "ca.example.net; policy=ev" caa02.example. 3600 IN CAA 128 tbs "Unknown" caa03.example. 3600 IN CAA 128 tbs "" @@ -56,6 +57,7 @@ eui64.example. 3600 IN EUI64 01-23-45-67-89-ab-cd-ef gid01.example. 3600 IN GID \# 1 03 gpos01.example. 3600 IN GPOS "-22.6882" "116.8652" "250.0" gpos02.example. 3600 IN GPOS "" "" "" +hhit.example. 3600 IN HHIT abcd hinfo01.example. 3600 IN HINFO "Generic PC clone" "NetBSD-1.4" hinfo02.example. 3600 IN HINFO "PC" "NetBSD" hip1.example. 3600 IN HIP 2 200100107B1A74DF365639CC39F1D578 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D diff --git a/tests/dns/rdata_test.c b/tests/dns/rdata_test.c index 48090d25b6c..2141596854b 100644 --- a/tests/dns/rdata_test.c +++ b/tests/dns/rdata_test.c @@ -1102,6 +1102,24 @@ ISC_RUN_TEST_IMPL(amtrelay) { dns_rdatatype_amtrelay, sizeof(dns_rdata_amtrelay_t)); } +/* BRIB RDATA - base64 encoded opaque */ +ISC_RUN_TEST_IMPL(brib) { + text_ok_t text_ok[] = { /* empty */ + TEXT_INVALID(""), + /* valid base64 string */ + TEXT_VALID("aaaa"), + /* invalid base64 string */ + TEXT_INVALID("aaaaa"), + /* + * Sentinel. + */ + TEXT_SENTINEL() + }; + + check_rdata(text_ok, NULL, NULL, true, dns_rdataclass_in, + dns_rdatatype_brid, sizeof(dns_rdata_brid_t)); +} + ISC_RUN_TEST_IMPL(cdnskey) { key_required(state, dns_rdatatype_cdnskey, sizeof(dns_rdata_cdnskey_t)); } @@ -2077,6 +2095,24 @@ ISC_RUN_TEST_IMPL(hip) { sizeof(dns_rdata_hip_t)); } +/* HHIT RDATA - base64 encoded opaque */ +ISC_RUN_TEST_IMPL(hhit) { + text_ok_t text_ok[] = { /* empty */ + TEXT_INVALID(""), + /* valid base64 string */ + TEXT_VALID("aaaa"), + /* invalid base64 string */ + TEXT_INVALID("aaaaa"), + /* + * Sentinel. + */ + TEXT_SENTINEL() + }; + + check_rdata(text_ok, NULL, NULL, true, dns_rdataclass_in, + dns_rdatatype_hhit, sizeof(dns_rdata_hhit_t)); +} + /* * ISDN tests. *