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 t_kcov



details:   https://anonhg.NetBSD.org/src/rev/ba12e3a399d6
branches:  trunk
changeset: 997176:ba12e3a399d6
user:      kamil <kamil%NetBSD.org@localhost>
date:      Mon Feb 25 10:23:01 2019 +0000

description:
Fix build of t_kcov

Correct the syntax that used to work in earlier uncommitted version.

diffstat:

 tests/modules/t_kcov.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 2ab82305bf0b -r ba12e3a399d6 tests/modules/t_kcov.c
--- a/tests/modules/t_kcov.c    Mon Feb 25 07:36:16 2019 +0000
+++ b/tests/modules/t_kcov.c    Mon Feb 25 10:23:01 2019 +0000
@@ -214,7 +214,6 @@
        ATF_CHECK(ioctl(fd, KCOV_IOC_ENABLE) == 0);
 }
 
-#ifdef __HAVE_ATOMIC64_OPS
 static void *
 common_head(int *fdp)
 {
@@ -254,10 +253,10 @@
        ATF_REQUIRE_MSG(ioctl(fd, KCOV_IOC_ENABLE) == 0,
            "Unable to enable kcov ");
 
-       KCOV_STORE(&buf[0], 0);
+       KCOV_STORE(buf[0], 0);
 
        sleep(0);
-       ATF_REQUIRE_MSG(KCOV_LOAD(&buf[0]) != 0, "No records found");
+       ATF_REQUIRE_MSG(KCOV_LOAD(buf[0]) != 0, "No records found");
 
        ATF_REQUIRE_MSG(ioctl(fd, KCOV_IOC_DISABLE) == 0,
            "Unable to disable kcov");
@@ -270,9 +269,9 @@
 {
        kcov_int_t *buf = ptr;
 
-       KCOV_STORE(&buf[0], 0);
+       KCOV_STORE(buf[0], 0);
        sleep(0);
-       ATF_REQUIRE_MSG(KCOV_LOAD(&buf[0]) == 0,
+       ATF_REQUIRE_MSG(KCOV_LOAD(buf[0]) == 0,
            "Records changed in blocked thread");
 
        return NULL;
@@ -298,7 +297,6 @@
 
        common_tail(fd, buf);
 }
-#endif
 
 ATF_TP_ADD_TCS(tp)
 {



Home | Main Index | Thread Index | Old Index