Module Name: src
Committed By: kamil
Date: Sat Feb 23 08:03:24 UTC 2019
Modified Files:
src/tests/modules: t_kcov.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/modules/t_kcov.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/modules/t_kcov.c
diff -u src/tests/modules/t_kcov.c:1.1 src/tests/modules/t_kcov.c:1.2
--- src/tests/modules/t_kcov.c:1.1 Sat Feb 23 03:10:06 2019
+++ src/tests/modules/t_kcov.c Sat Feb 23 08:03:24 2019
@@ -214,6 +214,7 @@ ATF_TC_BODY(kcov_enable_no_disable_no_cl
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();
}