From owner-svn-src-head@FreeBSD.ORG Sun Nov 16 05:20:00 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 427146BC; Sun, 16 Nov 2014 05:20:00 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF898E4; Sun, 16 Nov 2014 05:19:59 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 0E1B3341F852; Sat, 15 Nov 2014 21:19:59 -0800 (PST) Message-ID: <546833FE.9060904@freebsd.org> Date: Sat, 15 Nov 2014 21:19:58 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r274573 - head/contrib/netbsd-tests/lib/libpthread References: <201411160508.sAG58JdG055637@svn.freebsd.org> In-Reply-To: <201411160508.sAG58JdG055637@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Sun, 16 Nov 2014 05:20:00 -0000 This looks easy enough to fix under _thr_find_thread() in libthread. Any interest in fixing it? Might be worth hacking _thr_find_thread() to take an ERRNO to return based on NULL until we chase down all the paths into it just in case EINVAL is a valid ptr. Also, just wondering what happens on other platforms, does it elicit a crash? Ie. is NULL a safe value to pass in on other platforms? -Alfred On 11/15/14, 9:08 PM, Garrett Cooper wrote: > Author: ngie > Date: Sun Nov 16 05:08:19 2014 > New Revision: 274573 > URL: https://svnweb.freebsd.org/changeset/base/274573 > > Log: > Expect :pthread_detach to fail with EINVAL instead of ESRCH on FreeBSD > > PR: 191906 > In collaboration with: pho > > Modified: > head/contrib/netbsd-tests/lib/libpthread/t_detach.c > > Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c > ============================================================================== > --- head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:06:35 2014 (r274572) > +++ head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sun Nov 16 05:08:19 2014 (r274573) > @@ -75,6 +75,10 @@ ATF_TC_BODY(pthread_detach, tc) > rv = pthread_join(t, NULL); > ATF_REQUIRE(rv == EINVAL); > > +#if defined(__FreeBSD__) > + atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); > +#endif > + > /* > * As usual, ESRCH should follow if > * we try to detach an invalid thread. >