summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-03-12 19:15:09 +0000
committerngie <ngie@FreeBSD.org>2016-03-12 19:15:09 +0000
commit95255619b4b859c1de93bfd1115da11250179f46 (patch)
tree115740c1b6d08373c495b9ec461c31c3eaaa89ee /contrib/netbsd-tests
parent7a860d9998712366b5c9ffe572f47ed0782c37bc (diff)
downloadFreeBSD-src-95255619b4b859c1de93bfd1115da11250179f46.zip
FreeBSD-src-95255619b4b859c1de93bfd1115da11250179f46.tar.gz
MFC r294899:
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)
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_mincore.c3
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);
OpenPOWER on IntegriCloud