From owner-svn-src-all@freebsd.org Thu Feb 21 09:43:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F007014D99A8; Thu, 21 Feb 2019 09:43:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B706B6B1FD; Thu, 21 Feb 2019 09:43:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A80141BCB2; Thu, 21 Feb 2019 09:43:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1L9hEJ6006975; Thu, 21 Feb 2019 09:43:14 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1L9hElJ006974; Thu, 21 Feb 2019 09:43:14 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201902210943.x1L9hElJ006974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 21 Feb 2019 09:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344429 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 344429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B706B6B1FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.932,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 09:43:15 -0000 Author: andrew Date: Thu Feb 21 09:43:14 2019 New Revision: 344429 URL: https://svnweb.freebsd.org/changeset/base/344429 Log: Use KCOV_ENTRY_SIZE for the entry size. Previously it was sizeof(uint64_t). While this is currently true, it may not be on all future architectures. Sponsored by: DARPA, AFRL Modified: head/tests/sys/kern/kcov.c Modified: head/tests/sys/kern/kcov.c ============================================================================== --- head/tests/sys/kern/kcov.c Thu Feb 21 09:34:47 2019 (r344428) +++ head/tests/sys/kern/kcov.c Thu Feb 21 09:43:14 2019 (r344429) @@ -89,7 +89,7 @@ ATF_TC_BODY(kcov_mmap, tc) fd, 0) == MAP_FAILED); ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, - 2 * PAGE_SIZE / sizeof(uint64_t)) == 0); + 2 * PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0) == MAP_FAILED); @@ -113,7 +113,7 @@ ATF_TC_BODY(kcov_mmap_no_munmap, tc) fd = open_kcov(); - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0) != MAP_FAILED); @@ -128,7 +128,7 @@ ATF_TC_BODY(kcov_mmap_no_munmap_no_close, tc) fd = open_kcov(); - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0) != MAP_FAILED); @@ -144,7 +144,7 @@ kcov_mmap_enable_thread(void *data) fd = open_kcov(); *(int *)data = fd; - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0) != MAP_FAILED); ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == 0); @@ -180,7 +180,7 @@ ATF_TC_BODY(kcov_enable, tc) ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == -1); - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); /* We need to enable before disable */ ATF_CHECK(ioctl(fd, KIODISABLE, 0) == -1); @@ -208,7 +208,7 @@ ATF_TC_BODY(kcov_enable_no_disable, tc) int fd; fd = open_kcov(); - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == 0); close(fd); } @@ -219,7 +219,7 @@ ATF_TC_BODY(kcov_enable_no_disable_no_close, tc) int fd; fd = open_kcov(); - ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / sizeof(uint64_t)) ==0); + ATF_REQUIRE(ioctl(fd, KIOSETBUFSIZE, PAGE_SIZE / KCOV_ENTRY_SIZE) == 0); ATF_CHECK(ioctl(fd, KIOENABLE, KCOV_MODE_TRACE_PC) == 0); } @@ -232,7 +232,7 @@ common_head(int *fdp) fd = open_kcov(); ATF_REQUIRE_MSG(ioctl(fd, KIOSETBUFSIZE, - PAGE_SIZE / sizeof(uint64_t)) == 0, + PAGE_SIZE / KCOV_ENTRY_SIZE) == 0, "Unable to set the kcov buffer size"); data = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);