Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/modules Fix build of kcov tests on CPUs without 64-bit...
details: https://anonhg.NetBSD.org/src/rev/c0dc442e4704
branches: trunk
changeset: 839491:c0dc442e4704
user: kamil <kamil%NetBSD.org@localhost>
date: Sat Feb 23 08:03:24 2019 +0000
description:
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:
tests/modules/t_kcov.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (29 lines):
diff -r 534dc1c561d7 -r c0dc442e4704 tests/modules/t_kcov.c
--- a/tests/modules/t_kcov.c Sat Feb 23 07:33:20 2019 +0000
+++ b/tests/modules/t_kcov.c Sat Feb 23 08:03:24 2019 +0000
@@ -214,6 +214,7 @@
ATF_CHECK(ioctl(fd, KCOV_IOC_ENABLE) == 0);
}
+#ifdef __HAVE_ATOMIC64_OPS
static void *
common_head(int *fdp)
{
@@ -297,6 +298,7 @@
common_tail(fd, buf);
}
+#endif
ATF_TP_ADD_TCS(tp)
{
@@ -309,7 +311,9 @@
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();
}
Home |
Main Index |
Thread Index |
Old Index