From owner-svn-src-head@FreeBSD.ORG Fri Oct 24 03:53:50 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 C7EC2150; Fri, 24 Oct 2014 03:53:50 +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 B3860E0A; Fri, 24 Oct 2014 03:53:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9O3robp055417; Fri, 24 Oct 2014 03:53:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9O3roYD055416; Fri, 24 Oct 2014 03:53:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201410240353.s9O3roYD055416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 24 Oct 2014 03:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273574 - 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: Fri, 24 Oct 2014 03:53:50 -0000 Author: ngie Date: Fri Oct 24 03:53:49 2014 New Revision: 273574 URL: https://svnweb.freebsd.org/changeset/base/273574 Log: - Test for EINVAL requirement when passing an invalid flag in to msync(2) - Expect ENOMEM instead of EFAULT when msync'ing a previously munmap'ed region on FreeBSD Submitted by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msync.c Modified: head/contrib/netbsd-tests/lib/libc/sys/t_msync.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/sys/t_msync.c Fri Oct 24 03:48:54 2014 (r273573) +++ head/contrib/netbsd-tests/lib/libc/sys/t_msync.c Fri Oct 24 03:53:49 2014 (r273574) @@ -170,8 +170,15 @@ ATF_TC_BODY(msync_err, tc) /* * Test that invalid flags error out. */ +#ifdef __FreeBSD__ + errno = 0; + ATF_REQUIRE_ERRNO(EINVAL, msync_sync("error", -1) != NULL); + errno = 0; + ATF_REQUIRE_ERRNO(EINVAL, msync_sync("error", INT_MAX) != NULL); +#else ATF_REQUIRE(msync_sync("error", -1) != NULL); ATF_REQUIRE(msync_sync("error", INT_MAX) != NULL); +#endif errno = 0; @@ -185,7 +192,11 @@ ATF_TC_BODY(msync_err, tc) (void)munmap(map, page); ATF_REQUIRE(msync(map, page, MS_SYNC) != 0); +#ifdef __FreeBSD__ + ATF_REQUIRE(errno == ENOMEM); +#else ATF_REQUIRE(errno == EFAULT); +#endif } ATF_TC(msync_invalidate);