git: 1b7d882f005f - main - Enable the kcov tests on supported architectures
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Apr 2022 14:38:48 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=1b7d882f005ff472808201e7f3b0771d5c032ce9
commit 1b7d882f005ff472808201e7f3b0771d5c032ce9
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-04-07 13:31:32 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-04-07 13:31:51 +0000
Enable the kcov tests on supported architectures
i386 and 32-bit powerpc lack support for the needed atomic operations
in userspace.
Sponsored by: The FreeBSD Foundation
---
tests/sys/kern/Makefile | 5 ++++-
tests/sys/kern/kcov.c | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile
index e674329f77b1..0a422f42cdd3 100644
--- a/tests/sys/kern/Makefile
+++ b/tests/sys/kern/Makefile
@@ -10,7 +10,10 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel
TESTSDIR= ${TESTSBASE}/sys/kern
ATF_TESTS_C+= basic_signal
-#ATF_TESTS_C+= kcov
+.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "powerpc"
+# No support for atomic_load_64 on i386 or (32-bit) powerpc
+ATF_TESTS_C+= kcov
+.endif
ATF_TESTS_C+= kern_copyin
ATF_TESTS_C+= kern_descrip_test
ATF_TESTS_C+= fdgrowtable_test
diff --git a/tests/sys/kern/kcov.c b/tests/sys/kern/kcov.c
index 0a59ddbeff73..a8a43faf2d15 100644
--- a/tests/sys/kern/kcov.c
+++ b/tests/sys/kern/kcov.c
@@ -340,7 +340,7 @@ ATF_TC_BODY(kcov_thread_cmp, tc)
}
struct multi_thread_data {
- char *buf;
+ uint64_t *buf;
int fd;
u_int mode;
int thread;