NetBSD Problem Report #51884
From www@NetBSD.org Sun Jan 15 20:37:33 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 2F64D7A2A1
for <gnats-bugs@gnats.NetBSD.org>; Sun, 15 Jan 2017 20:37:33 +0000 (UTC)
Message-Id: <20170115203732.4CA677A2BE@mollari.NetBSD.org>
Date: Sun, 15 Jan 2017 20:37:32 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [PATCH] tests/lib/libpthread/t_condwait: various fixes
X-Send-Pr-Version: www-1.0
>Number: 51884
>Category: bin
>Synopsis: [PATCH] tests/lib/libpthread/t_condwait: various fixes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 15 20:40:00 +0000 2017
>Closed-Date: Mon Jan 16 18:28:06 +0000 2017
>Last-Modified: Mon Jan 16 18:28:06 +0000 2017
>Originator: Ngie Cooper
>Release: 7.0.2
>Organization:
>Environment:
n/a
>Description:
- Add sys/time.h #include for CLOCK_* #defines.
- Check result of pthread_condattr_init and pthread_condattr_setclock with PTHREAD_REQUIRE.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/51884: [PATCH] tests/lib/libpthread/t_condwait: various fixes
Date: Sun, 15 Jan 2017 13:02:11 -0800
--Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Patch attached.
-Ngie
--Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F
Content-Disposition: attachment;
filename=t_condwait-various-fixes.patch
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="t_condwait-various-fixes.patch"
Content-Transfer-Encoding: 7bit
Index: lib/libpthread/t_condwait.c
===================================================================
RCS file: /cvsroot/src/tests/lib/libpthread/t_condwait.c,v
retrieving revision 1.4
diff -u -r1.4 t_condwait.c
--- lib/libpthread/t_condwait.c 12 Apr 2013 17:18:11 -0000 1.4
+++ lib/libpthread/t_condwait.c 15 Jan 2017 20:37:55 -0000
@@ -28,6 +28,7 @@
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_condwait.c,v 1.4 2013/04/12 17:18:11 christos Exp $");
+#include <sys/time.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
@@ -40,6 +41,8 @@
#include "isqemu.h"
+#include "h_common.h"
+
#define WAITTIME 2 /* Timeout wait secound */
static const int debug = 1;
@@ -56,8 +59,8 @@
clck = *(clockid_t *)param;
- pthread_condattr_init(&attr);
- pthread_condattr_setclock(&attr, clck); /* MONOTONIC or MONOTONIC */
+ PTHREAD_REQUIRE(pthread_condattr_init(&attr));
+ PTHREAD_REQUIRE(pthread_condattr_setclock(&attr, clck));
pthread_cond_init(&cond, &attr);
ATF_REQUIRE_EQ((ret = pthread_mutex_lock(&m)), 0);
--Apple-Mail=_1C964623-BF34-482D-B7FC-87A57DD1A95F--
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51884 CVS commit: src/tests/lib/libpthread
Date: Mon, 16 Jan 2017 11:29:19 -0500
Module Name: src
Committed By: christos
Date: Mon Jan 16 16:29:19 UTC 2017
Modified Files:
src/tests/lib/libpthread: t_condwait.c
Log Message:
PR/51884: Ngie Cooper: Include and message fixes
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libpthread/t_condwait.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 16 Jan 2017 18:28:06 +0000
State-Changed-Why:
christos committed it. thanks!
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.