Add tests for BRID and HHIT

(cherry picked from commit 92621e6390)
This commit is contained in:
Mark Andrews 2025-07-30 15:22:05 +10:00
parent e63501f5b0
commit c0b39b9093
6 changed files with 51 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -1097,6 +1097,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));
}
@ -2033,6 +2051,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.
*