From: Michal Nowak Date: Wed, 27 Jan 2021 17:06:33 +0000 (+0100) Subject: Drop AddressSanitizer constraint from libns unit tests X-Git-Tag: v9.17.11~60^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=613be8706eca81fee97434e25fda4e9118cfe511;p=thirdparty%2Fbind9.git Drop AddressSanitizer constraint from libns unit tests The AddressSanitizer constraint in some libns unit tests does not seem to be necessary anymore, these tests run fine under AddressSanitizer. --- diff --git a/lib/ns/tests/listenlist_test.c b/lib/ns/tests/listenlist_test.c index 984328519c9..7e48e4c6fd6 100644 --- a/lib/ns/tests/listenlist_test.c +++ b/lib/ns/tests/listenlist_test.c @@ -11,7 +11,7 @@ #include -#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__ +#if HAVE_CMOCKA #include /* IWYU pragma: keep */ #include @@ -124,22 +124,15 @@ main(void) { return (cmocka_run_group_tests(tests, NULL, NULL)); } -#else /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#else /* HAVE_CMOCKA */ #include int main(void) { -#if __SANITIZE_ADDRESS__ - /* - * We disable this test when the address sanitizer is in - * the use, as libuv will trigger errors. - */ - printf("1..0 # Skip ASAN is in use\n"); -#else /* ADDRESS_SANIZITER */ printf("1..0 # Skip cmocka not available\n"); -#endif /* __SANITIZE_ADDRESS__ */ + return (0); } -#endif /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#endif /* HAVE_CMOCKA */ diff --git a/lib/ns/tests/notify_test.c b/lib/ns/tests/notify_test.c index b013dc209ce..61d4a251eb0 100644 --- a/lib/ns/tests/notify_test.c +++ b/lib/ns/tests/notify_test.c @@ -11,7 +11,7 @@ #include -#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__ +#if HAVE_CMOCKA #include /* IWYU pragma: keep */ #include @@ -150,22 +150,15 @@ main(void) { return (cmocka_run_group_tests(tests, NULL, NULL)); } -#else /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#else /* HAVE_CMOCKA */ #include int main(void) { -#if __SANITIZE_ADDRESS__ - /* - * We disable this test when the address sanitizer is in - * the use, as libuv will trigger errors. - */ - printf("1..0 # Skip ASAN is in use\n"); -#else /* __SANITIZE_ADDRESS__ */ printf("1..0 # Skip cmocka not available\n"); -#endif /* __SANITIZE_ADDRESS__ */ + return (0); } -#endif /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#endif /* HAVE_CMOCKA */ diff --git a/lib/ns/tests/query_test.c b/lib/ns/tests/query_test.c index 972a2c2cb4c..cb7c4b82f74 100644 --- a/lib/ns/tests/query_test.c +++ b/lib/ns/tests/query_test.c @@ -11,7 +11,7 @@ #include -#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__ +#if HAVE_CMOCKA #include #include /* IWYU pragma: keep */ @@ -1516,22 +1516,15 @@ main(void) { return (cmocka_run_group_tests(tests, NULL, NULL)); } -#else /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#else /* HAVE_CMOCKA */ #include int main(void) { -#if __SANITIZE_ADDRESS__ - /* - * We disable this test when the address sanitizer is in - * the use, as libuv will trigger errors. - */ - printf("1..0 # Skip ASAN is in use\n"); -#else /* ADDRESS_SANIZITER */ printf("1..0 # Skip cmocka not available\n"); -#endif /* __SANITIZE_ADDRESS__ */ + return (0); } -#endif /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */ +#endif /* HAVE_CMOCKA */