From owner-svn-src-projects@freebsd.org Sat Aug 13 04:45:41 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 05C9EBB818C for ; Sat, 13 Aug 2016 04:45:41 +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 B145A1B18; Sat, 13 Aug 2016 04:45:40 +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 u7D4jdgn093814; Sat, 13 Aug 2016 04:45:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7D4jdSd093813; Sat, 13 Aug 2016 04:45:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201608130445.u7D4jdSd093813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 13 Aug 2016 04:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r304036 - projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libpthread 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: Sat, 13 Aug 2016 04:45:41 -0000 Author: ngie Date: Sat Aug 13 04:45:39 2016 New Revision: 304036 URL: https://svnweb.freebsd.org/changeset/base/304036 Log: Expect :mutexattr2 to fail on FreeBSD pthread_mutexattr_getprioceiling and pthread_mutexattr_setprioceiling both return EINVAL if ->m_protocol != PTHREAD_PRIO_PROTECT. The reasoning behind this decision isn't documented in neither the FreeBSD nor the OpenGroup manpages. Add printf's to add in debugging the issue PR: 211802 Sponsored by: EMC / Isilon Storage Division Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libpthread/t_mutex.c Modified: projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libpthread/t_mutex.c ============================================================================== --- projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libpthread/t_mutex.c Sat Aug 13 02:53:02 2016 (r304035) +++ projects/netbsd-tests-update-12/contrib/netbsd-tests/lib/libpthread/t_mutex.c Sat Aug 13 04:45:39 2016 (r304036) @@ -553,14 +553,31 @@ ATF_TC_BODY(mutexattr2, tc) { pthread_mutexattr_t mattr; +#ifdef __FreeBSD__ + atf_tc_expect_fail("fails on i == 0 with: " + "pthread_mutexattr_setprioceiling(&mattr, i): Invalid argument " + "-- PR # 211802"); +#endif + PTHREAD_REQUIRE(pthread_mutexattr_init(&mattr)); int max_prio = sched_get_priority_max(SCHED_FIFO); int min_prio = sched_get_priority_min(SCHED_FIFO); for (int i = min_prio; i <= max_prio; i++) { int prioceiling; +#ifdef __FreeBSD__ + int protocol; + + PTHREAD_REQUIRE(pthread_mutexattr_getprotocol(&mattr, + &protocol)); + + printf("priority: %d\nprotocol: %d\n", i, protocol); +#endif PTHREAD_REQUIRE(pthread_mutexattr_setprioceiling(&mattr, i)); PTHREAD_REQUIRE(pthread_mutexattr_getprioceiling(&mattr, &prioceiling)); +#ifdef __FreeBSD__ + printf("prioceiling: %d\n", prioceiling); +#endif ATF_REQUIRE_EQ(i, prioceiling); } }