From owner-svn-src-projects@freebsd.org Thu Aug 25 19:17:17 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6CC8BC6FC5 for ; Thu, 25 Aug 2016 19:17:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B96C31A30; Thu, 25 Aug 2016 19:17:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7PJHGPd015511; Thu, 25 Aug 2016 19:17:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7PJHGG5015510; Thu, 25 Aug 2016 19:17:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201608251917.u7PJHGG5015510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 25 Aug 2016 19:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r304813 - projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2016 19:17:18 -0000 Author: ngie Date: Thu Aug 25 19:17:16 2016 New Revision: 304813 URL: https://svnweb.freebsd.org/changeset/base/304813 Log: Don't test `size[i] % align[i] == 0` case on FreeBSD Per jemalloc(3)/aligned_alloc(3), the behavior is undefined if the size isn't an integral multiple of the alignment. Thus, this is a NetBSD-specific test. Sponsored by: EMC / Isilon Storage Division Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib/t_posix_memalign.c Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib/t_posix_memalign.c ============================================================================== --- projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib/t_posix_memalign.c Thu Aug 25 19:15:02 2016 (r304812) +++ projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libc/stdlib/t_posix_memalign.c Thu Aug 25 19:17:16 2016 (r304813) @@ -121,9 +121,19 @@ ATF_TC_BODY(aligned_alloc_basic, tc) ATF_REQUIRE_EQ_MSG((align[i] - 1) & align[i], 0, "aligned_alloc: success when alignment was not " "a power of 2"); +#ifdef __NetBSD__ + /* + * NetBSD-specific invariant + * + * From aligned_alloc(3) on FreeBSD: + * + * Behavior is undefined if size is not an integral + * multiple of alignment. + */ ATF_REQUIRE_EQ_MSG(size[i] % align[i], 0, "aligned_alloc: success when size was not an " "integer multiple of alignment"); +#endif ATF_REQUIRE_EQ_MSG(((intptr_t)p) & (align[i] - 1), 0, "p = %p", p); free(p);