Module Name: src Committed By: msaitoh Date: Mon Dec 22 02:06:10 UTC 2014
Modified Files: src/tests/lib/libpthread [netbsd-7]: t_cond.c Log Message: Pull up following revision(s) (requested by gson in ticket #346): tests/lib/libpthread/t_cond.c: revision 1.6 The cond_timedwait_race test case is no longer expected to fail; it has been consistently passing since CVS date 2014.01.31.19.22.00. See also PR lib/44756. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/tests/lib/libpthread/t_cond.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libpthread/t_cond.c diff -u src/tests/lib/libpthread/t_cond.c:1.5 src/tests/lib/libpthread/t_cond.c:1.5.4.1 --- src/tests/lib/libpthread/t_cond.c:1.5 Sat Oct 19 17:45:01 2013 +++ src/tests/lib/libpthread/t_cond.c Mon Dec 22 02:06:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_cond.c,v 1.5 2013/10/19 17:45:01 christos Exp $ */ +/* $NetBSD: t_cond.c,v 1.5.4.1 2014/12/22 02:06:10 msaitoh Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_cond.c,v 1.5 2013/10/19 17:45:01 christos Exp $"); +__RCSID("$NetBSD: t_cond.c,v 1.5.4.1 2014/12/22 02:06:10 msaitoh Exp $"); #include <sys/time.h> @@ -343,25 +343,17 @@ ATF_TC_HEAD(cond_timedwait_race, tc) ATF_TC_BODY(cond_timedwait_race, tc) { pthread_t tid[64]; - size_t i, j; + size_t i; - atf_tc_expect_fail("PR lib/44756"); - /* This outer loop is to ensure that a false positive of this race - * test does not report the test as broken (due to the test not - * triggering the expected failure). However, we want to make this - * fail consistently when the race is resolved, and this approach - * will have the desired effect. */ - for (j = 0; j < 10; j++ ) { - for (i = 0; i < __arraycount(tid); i++) { - - PTHREAD_REQUIRE(pthread_create(&tid[i], NULL, - pthread_cond_timedwait_func, NULL)); - } + for (i = 0; i < __arraycount(tid); i++) { - for (i = 0; i < __arraycount(tid); i++) { + PTHREAD_REQUIRE(pthread_create(&tid[i], NULL, + pthread_cond_timedwait_func, NULL)); + } + + for (i = 0; i < __arraycount(tid); i++) { - PTHREAD_REQUIRE(pthread_join(tid[i], NULL)); - } + PTHREAD_REQUIRE(pthread_join(tid[i], NULL)); } }