From owner-svn-src-head@FreeBSD.ORG Thu Oct 23 08:05:04 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5C5EC5B; Thu, 23 Oct 2014 08:05:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9891EBD5; Thu, 23 Oct 2014 08:05:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9N854Rn087006; Thu, 23 Oct 2014 08:05:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9N854dD087005; Thu, 23 Oct 2014 08:05:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410230805.s9N854dD087005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 23 Oct 2014 08:05:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273535 - head/contrib/netbsd-tests/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 08:05:04 -0000 Author: ngie Date: Thu Oct 23 08:05:03 2014 New Revision: 273535 URL: https://svnweb.freebsd.org/changeset/base/273535 Log: - Omit setrlimit_nthr testcase on FreeBSD (requires lwp.h, et al) - Expect overflow with rlim_max at INT64_MAX, not UINT64_MAX (rlim_t is int64_t on FreeBSD) In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Thu Oct 23 07:59:59 2014 (r273534) +++ head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Thu Oct 23 08:05:03 2014 (r273535) @@ -39,7 +39,9 @@ __RCSID("$NetBSD: t_setrlimit.c,v 1.4 20 #include #include #include +#ifdef __NetBSD__ #include +#endif #include #include #include @@ -438,6 +440,7 @@ ATF_TC_BODY(setrlimit_nproc, tc) atf_tc_fail("RLIMIT_NPROC not enforced"); } +#ifdef __NetBSD__ ATF_TC(setrlimit_nthr); ATF_TC_HEAD(setrlimit_nthr, tc) { @@ -474,6 +477,7 @@ ATF_TC_BODY(setrlimit_nthr, tc) makecontext(&c, func, 1, &lwpid); ATF_CHECK_ERRNO(EAGAIN, _lwp_create(&c, 0, &lwpid) == -1); } +#endif ATF_TC(setrlimit_perm); ATF_TC_HEAD(setrlimit_perm, tc) @@ -494,7 +498,11 @@ ATF_TC_BODY(setrlimit_perm, tc) ATF_REQUIRE(getrlimit(rlimit[i], &res) == 0); +#ifdef __FreeBSD__ + if (res.rlim_max == INT64_MAX) /* Overflow. */ +#else if (res.rlim_max == UINT64_MAX) /* Overflow. */ +#endif continue; errno = 0; @@ -516,7 +524,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, setrlimit_nofile_2); ATF_TP_ADD_TC(tp, setrlimit_nproc); ATF_TP_ADD_TC(tp, setrlimit_perm); +#ifdef __FreeBSD__ ATF_TP_ADD_TC(tp, setrlimit_nthr); +#endif return atf_no_error(); }