diff options
author | Richard Yao <[email protected]> | 2013-12-26 15:51:35 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-03-12 09:05:00 -0700 |
commit | 202619623022722f30c2ee49931a4fa6896421c7 (patch) | |
tree | db23ab303d3afbaca78be3d9614bfa17a9ea46ee | |
parent | 85802aa42bf8f878022ec73ddde6bf3702f67d01 (diff) |
Switch ztest mmap(2) ASSERTs to VERIFYs
This is just a small bit of cleanup to ensure ztest fails early
on systems where mmap(2) is not functioning. For the automated
testing which is the primary consumer of ztest there is no
functional change because debugging is always enabled.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2177
-rw-r--r-- | cmd/ztest/ztest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index d04b4dea0..d392a625e 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -6086,7 +6086,7 @@ setup_hdr(void) hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); - ASSERT(hdr != MAP_FAILED); + VERIFY3P(hdr, !=, MAP_FAILED); VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t))); @@ -6113,14 +6113,14 @@ setup_data(void) hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), PROT_READ, MAP_SHARED, ztest_fd_data, 0); - ASSERT(hdr != MAP_FAILED); + VERIFY3P(hdr, !=, MAP_FAILED); size = shared_data_size(hdr); (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()), PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); - ASSERT(hdr != MAP_FAILED); + VERIFY3P(hdr, !=, MAP_FAILED); buf = (uint8_t *)hdr; offset = hdr->zh_hdr_size; |