From d20db9d537a86bd3d2904192e5fa0a74b9decc7a Mon Sep 17 00:00:00 2001 From: ngie Date: Fri, 10 Oct 2014 19:28:57 +0000 Subject: Disable the invalid pointer test on FreeBSD FreeBSD segfaults on invalid pointers passed to getcwd because it throbs the address passed in in libc, whereas NetBSD just passes the information off to the syscall, which allows the kernel to return EFAULT on bad pointers. In collaboration with: pho Sponsored by: EMC / Isilon Storage Division --- contrib/netbsd-tests/lib/libc/gen/t_getcwd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'contrib/netbsd-tests/lib/libc') diff --git a/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c b/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c index 76c287a..bb3baf0 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c @@ -56,10 +56,12 @@ ATF_TC_BODY(getcwd_err, tc) ATF_REQUIRE(getcwd(buf, 0) == NULL); ATF_REQUIRE(errno == EINVAL); +#if defined(__NetBSD__) errno = 0; ATF_REQUIRE(getcwd((void *)-1, sizeof(buf)) == NULL); ATF_REQUIRE(errno == EFAULT); +#endif } ATF_TC(getcwd_fts); -- cgit v1.1