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.

(cherry picked from commit 613be8706e)
This commit is contained in:
Michal Nowak
2021-01-27 18:06:33 +01:00
parent 33ef49d828
commit 001413ed50
3 changed files with 12 additions and 33 deletions

View 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 */

View 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>
@@ -156,22 +156,15 @@ main(void) {
print_message("1..0 # Skip notify_test requires libtool or LD_WRAP\n");
#endif /* if defined(USE_LIBTOOL) || LD_WRAP */
}
#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 */

View 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 */
@@ -617,22 +617,15 @@ main(void) {
#endif /* if defined(USE_LIBTOOL) || LD_WRAP */
}
#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 */