mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-27 10:24:22 +03:00
Revert "Switch ztest mmap(2) ASSERTs to VERIFYs"
This reverts commit 2026196230
.
It is no longer necessary now that we pass -DDEBUG unconditionally.
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4095
This commit is contained in:
parent
27075111ed
commit
799402d8c7
@ -6185,7 +6185,7 @@ setup_hdr(void)
|
|||||||
|
|
||||||
hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
|
hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
|
||||||
PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0);
|
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)));
|
VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t)));
|
||||||
|
|
||||||
@ -6212,14 +6212,14 @@ setup_data(void)
|
|||||||
|
|
||||||
hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
|
hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()),
|
||||||
PROT_READ, MAP_SHARED, ztest_fd_data, 0);
|
PROT_READ, MAP_SHARED, ztest_fd_data, 0);
|
||||||
VERIFY3P(hdr, !=, MAP_FAILED);
|
ASSERT(hdr != MAP_FAILED);
|
||||||
|
|
||||||
size = shared_data_size(hdr);
|
size = shared_data_size(hdr);
|
||||||
|
|
||||||
(void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize()));
|
(void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize()));
|
||||||
hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()),
|
hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()),
|
||||||
PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0);
|
PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0);
|
||||||
VERIFY3P(hdr, !=, MAP_FAILED);
|
ASSERT(hdr != MAP_FAILED);
|
||||||
buf = (uint8_t *)hdr;
|
buf = (uint8_t *)hdr;
|
||||||
|
|
||||||
offset = hdr->zh_hdr_size;
|
offset = hdr->zh_hdr_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user