Skip to content

Commit

Permalink
Revert "Switch ztest mmap(2) ASSERTs to VERIFYs"
Browse files Browse the repository at this point in the history
This reverts commit 2026196.

It is no longer necessary now that we pass -DDEBUG unconditionally.

Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs#4095
  • Loading branch information
ryao authored and behlendorf committed Dec 14, 2015
1 parent 2707511 commit 799402d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/ztest/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -6185,7 +6185,7 @@ setup_hdr(void)

hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0);
VERIFY3P(hdr, !=, MAP_FAILED);
ASSERT(hdr != MAP_FAILED);

VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t)));

Expand All @@ -6212,14 +6212,14 @@ setup_data(void)

hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
PROT_READ, MAP_SHARED, ztest_fd_data, 0);
VERIFY3P(hdr, !=, MAP_FAILED);
ASSERT(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);
VERIFY3P(hdr, !=, MAP_FAILED);
ASSERT(hdr != MAP_FAILED);
buf = (uint8_t *)hdr;

offset = hdr->zh_hdr_size;
Expand Down

0 comments on commit 799402d

Please sign in to comment.