2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

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.
This commit is contained in:
Michal Nowak
2021-01-27 18:06:33 +01:00
parent 1c428cc157
commit 613be8706e
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>
@@ -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 */

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