aboutsummaryrefslogtreecommitdiff
path: root/tests/dns.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-19 23:15:27 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-19 23:16:48 +0200
commit839a9de688f0a3c09ab8ef00337ca03c32c44796 (patch)
tree6d3734e5b2349c8503c27f6f1d5fe8d48b5160f4 /tests/dns.c
parent2909e565636dd10eb322a3b2bd3296b8292240f9 (diff)
downloaddns-839a9de688f0a3c09ab8ef00337ca03c32c44796.tar.gz
add fqdn_check()
Diffstat (limited to 'tests/dns.c')
-rw-r--r--tests/dns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/dns.c b/tests/dns.c
index a282b8b..49310ba 100644
--- a/tests/dns.c
+++ b/tests/dns.c
@@ -23,7 +23,8 @@ START_TEST (dns_qname) {
/* Check for working invalid protection */
ck_assert_int_gt( fqdn_to_qname (inval_fqdn,strlen(inval_fqdn),out,128), 0 );
- ck_assert_int_lt( qname_check(out,128), 0 );
+ ck_assert_int_ne( qname_check(out,128), 0 );
+ ck_assert_int_ne( fqdn_check(inval_fqdn,strlen(inval_fqdn)), 0 );
} END_TEST
START_TEST (dns_qname_fuzz) {
@@ -44,6 +45,7 @@ START_TEST (dns_qname_fuzz) {
}
}
+ /* Do not allow more than 10% false-positives */
ck_assert_float_le( (float)valid_cnt / (float)limit * 100, 10);
} END_TEST
@@ -69,6 +71,7 @@ START_TEST (dns_message_fuzz) {
}
}
+ /* Do not allow more than 10% false-positives */
ck_assert_float_le( (float)valid_cnt / (float)limit * 100, 10);
} END_TEST