diff options
| author | kamil <kamil@NetBSD.org> | 2019-02-23 08:03:24 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2019-02-23 08:03:24 +0000 |
| commit | 8df99d236f6b7922d7e95a23cacec253a3cd0ec3 (patch) | |
| tree | 76c54d2c58a9f90f0a05d22eb4f02a305c157611 /tests/modules | |
| parent | ee995b15ee9aaae47cc7509f6a437fe8854864ad (diff) | |
Fix build of kcov tests on CPUs without 64-bit atomics
Restrict the 64-bit atomics to ports defining __HAVE_ATOMIC64_OPS.
Using 64-bit atomics is still good for i586 fuzzing, but the tests are
build for earlier CPUs. This makes this code to be disabled in i386 builds.
There is a similar situation with few other ports that offer 64-bit atomics
in certain CPU models and ABIs.
Diffstat (limited to 'tests/modules')
| -rw-r--r-- | tests/modules/t_kcov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modules/t_kcov.c b/tests/modules/t_kcov.c index baf4f0f08f5..5b9663d48c7 100644 --- a/tests/modules/t_kcov.c +++ b/tests/modules/t_kcov.c @@ -214,6 +214,7 @@ ATF_TC_BODY(kcov_enable_no_disable_no_close, tc) ATF_CHECK(ioctl(fd, KCOV_IOC_ENABLE) == 0); } +#ifdef __HAVE_ATOMIC64_OPS static void * common_head(int *fdp) { @@ -297,6 +298,7 @@ ATF_TC_BODY(kcov_thread, tc) common_tail(fd, buf); } +#endif ATF_TP_ADD_TCS(tp) { @@ -309,7 +311,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, kcov_enable_no_disable); ATF_TP_ADD_TC(tp, kcov_enable_no_disable_no_close); ATF_TP_ADD_TC(tp, kcov_mmap_enable_thread_close); +#ifdef __HAVE_ATOMIC64_OPS ATF_TP_ADD_TC(tp, kcov_basic); ATF_TP_ADD_TC(tp, kcov_thread); +#endif return atf_no_error(); } |
