Module Name:    src
Committed By:   martin
Date:           Thu Jun 11 11:40:54 UTC 2020

Modified Files:
        src/tests/lib/libpthread: t_mtx.c

Log Message:
Do not destroy mutices that failed to init - fixes a run with
PTHREAD_DIAGASSERT set to "a". Pointed out by joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libpthread/t_mtx.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_mtx.c
diff -u src/tests/lib/libpthread/t_mtx.c:1.1 src/tests/lib/libpthread/t_mtx.c:1.2
--- src/tests/lib/libpthread/t_mtx.c:1.1	Wed Apr 24 11:43:19 2019
+++ src/tests/lib/libpthread/t_mtx.c	Thu Jun 11 11:40:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_mtx.c,v 1.1 2019/04/24 11:43:19 kamil Exp $	*/
+/*	$NetBSD: t_mtx.c,v 1.2 2020/06/11 11:40:54 martin Exp $	*/
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2019\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_mtx.c,v 1.1 2019/04/24 11:43:19 kamil Exp $");
+__RCSID("$NetBSD: t_mtx.c,v 1.2 2020/06/11 11:40:54 martin Exp $");
 
 #include <time.h>
 #include <threads.h>
@@ -62,13 +62,10 @@ ATF_TC_BODY(mtx_init, tc)
 	mtx_destroy(&m);
 
 	ATF_REQUIRE_EQ(mtx_init(&m, mtx_recursive), thrd_error);
-	mtx_destroy(&m);
 
 	ATF_REQUIRE_EQ(mtx_init(&m, mtx_plain | mtx_timed), thrd_error);
-	mtx_destroy(&m);
 
 	ATF_REQUIRE_EQ(mtx_init(&m, -1), thrd_error);
-	mtx_destroy(&m);
 }
 
 ATF_TC(mtx_lock);

Reply via email to