diff options
author | ngie <ngie@FreeBSD.org> | 2016-01-27 07:06:49 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-01-27 07:06:49 +0000 |
commit | 61503a8b9a08d7b89fb84849b5755265ed602016 (patch) | |
tree | 2ab4933d536267841ebe3bcbc5a0ed5d7af2e8dd /contrib/netbsd-tests/lib/libc | |
parent | 2dbb39130019d05d6f738a3393c9e7c1c5ce080d (diff) | |
download | FreeBSD-src-61503a8b9a08d7b89fb84849b5755265ed602016.zip FreeBSD-src-61503a8b9a08d7b89fb84849b5755265ed602016.tar.gz |
Add debug output via ATF_REQUIRE_MSG when the first call to
mlock(2) fails
This helps identify the problem with running this test on my VM
hosts (ENOMEM)
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_mincore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c index 499493f..872856e 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c @@ -206,7 +206,8 @@ ATF_TC_BODY(mincore_resid, tc) "might be low on memory"); #ifdef __FreeBSD__ - ATF_REQUIRE(mlock(addr, npgs * page) == 0); + ATF_REQUIRE_MSG(mlock(addr, npgs * page) == 0, "mlock failed: %s", + strerror(errno)); #endif ATF_REQUIRE(check_residency(addr, npgs) == npgs); ATF_REQUIRE(munmap(addr, npgs * page) == 0); |