]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Drop AddressSanitizer constraint from libns unit tests
authorMichal Nowak <mnowak@isc.org>
Wed, 27 Jan 2021 17:06:33 +0000 (18:06 +0100)
committerMichal Nowak <mnowak@isc.org>
Wed, 10 Feb 2021 09:54:32 +0000 (09:54 +0000)
The AddressSanitizer constraint in some libns unit tests does not seem
to be necessary anymore, these tests run fine under AddressSanitizer.

lib/ns/tests/listenlist_test.c
lib/ns/tests/notify_test.c
lib/ns/tests/query_test.c

index 984328519c9d36ce7629af752a34079fb89c8a3c..7e48e4c6fd6fe73d69101fa05f69a3b9303a2adb 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <isc/util.h>
 
-#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__
+#if HAVE_CMOCKA
 
 #include <sched.h> /* IWYU pragma: keep */
 #include <setjmp.h>
@@ -124,22 +124,15 @@ main(void) {
        return (cmocka_run_group_tests(tests, NULL, NULL));
 }
 
-#else /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */
+#else /* HAVE_CMOCKA */
 
 #include <stdio.h>
 
 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 */
index b013dc209cea930130ed8e7fc674c9dd2aa21df3..61d4a251eb0035ab7a74f51f2cf8e28a050ec2d6 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <isc/util.h>
 
-#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__
+#if HAVE_CMOCKA
 
 #include <sched.h> /* IWYU pragma: keep */
 #include <setjmp.h>
@@ -150,22 +150,15 @@ main(void) {
 
        return (cmocka_run_group_tests(tests, NULL, NULL));
 }
-#else /* HAVE_CMOCKA && !__SANITIZE_ADDRESS__ */
+#else /* HAVE_CMOCKA */
 
 #include <stdio.h>
 
 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 */
index 972a2c2cb4ce9046a93512179e178c6467498ffe..cb7c4b82f74b1f60d03f9e8933f3a45ccbfe150c 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <isc/util.h>
 
-#if HAVE_CMOCKA && !__SANITIZE_ADDRESS__
+#if HAVE_CMOCKA
 
 #include <inttypes.h>
 #include <sched.h> /* 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 <stdio.h>
 
 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 */