View | Details | Raw Unified | Return to bug 196738
Collapse All | Expand All

(-)b/contrib/netbsd-tests/lib/libpthread/t_detach.c (+12 lines)
Lines 38-48 __RCSID("$NetBSD: t_detach.c,v 1.1 2011/03/24 13:52:04 jruoho Exp $"); Link Here
38
38
39
#include "h_common.h"
39
#include "h_common.h"
40
40
41
#ifdef __FreeBSD__
42
#include <time.h>
43
#endif
44
41
static void	*func(void *);
45
static void	*func(void *);
42
46
43
static void *
47
static void *
44
func(void *arg)
48
func(void *arg)
45
{
49
{
50
#ifdef __FreeBSD__
51
	sleep(2);
52
#endif
46
	return NULL;
53
	return NULL;
47
}
54
}
48
55
Lines 72-81 ATF_TC_BODY(pthread_detach, tc) Link Here
72
	 */
79
	 */
73
	PTHREAD_REQUIRE(pthread_detach(t));
80
	PTHREAD_REQUIRE(pthread_detach(t));
74
81
82
#ifdef __FreeBSD__
83
	sleep(1);
84
#endif
85
75
	rv = pthread_join(t, NULL);
86
	rv = pthread_join(t, NULL);
76
	ATF_REQUIRE(rv == EINVAL);
87
	ATF_REQUIRE(rv == EINVAL);
77
88
78
#ifdef __FreeBSD__
89
#ifdef __FreeBSD__
90
	sleep(3);
79
	atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH");
91
	atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH");
80
#endif
92
#endif
81
93

Return to bug 196738