Date: Fri, 10 Oct 2014 08:57:55 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272891 - head/contrib/netbsd-tests/lib/libc/stdlib Message-ID: <201410100857.s9A8vtvh047276@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Fri Oct 10 08:57:55 2014 New Revision: 272891 URL: https://svnweb.freebsd.org/changeset/base/272891 Log: Expect SIGSEGV in lib/libc/stdlib/t_getenv:setenv_basic See bin/189805 for more details In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Modified: head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Fri Oct 10 08:35:16 2014 (r272890) +++ head/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Fri Oct 10 08:57:55 2014 (r272891) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_getenv.c,v 1.2 2011/ #include <stdio.h> #include <stdlib.h> #include <string.h> +#if defined(__FreeBSD__) +#include <signal.h> +#endif extern char **environ; @@ -152,6 +155,15 @@ ATF_TC_BODY(setenv_basic, tc) ATF_CHECK_ERRNO(EINVAL, setenv(NULL, "val", 1) == -1); ATF_CHECK_ERRNO(EINVAL, setenv("", "val", 1) == -1); ATF_CHECK_ERRNO(EINVAL, setenv("v=r", "val", 1) == -1); +#if defined(__FreeBSD__) + /* + Both FreeBSD and OS/X does not validate the second + argument to setenv(3) + */ + atf_tc_expect_signal(SIGSEGV, "FreeBSD does not validate the second " + "argument to setenv(3); see bin/189805"); +#endif + ATF_CHECK_ERRNO(EINVAL, setenv("var", NULL, 1) == -1); ATF_CHECK(setenv("var", "=val", 1) == 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410100857.s9A8vtvh047276>