Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libpthread Make the mutex6 test (which fails every...



details:   https://anonhg.NetBSD.org/src/rev/cd1de21b6306
branches:  trunk
changeset: 352445:cd1de21b6306
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Apr 01 17:19:40 2017 +0000

description:
Make the mutex6 test (which fails every know and then, but too rarely
to actually debug it) print some debug info when failing.

diffstat:

 tests/lib/libpthread/t_mutex.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7e7a9aae7584 -r cd1de21b6306 tests/lib/libpthread/t_mutex.c
--- a/tests/lib/libpthread/t_mutex.c    Sat Apr 01 14:53:48 2017 +0000
+++ b/tests/lib/libpthread/t_mutex.c    Sat Apr 01 17:19:40 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.17 2017/03/23 08:31:00 martin Exp $ */
+/* $NetBSD: t_mutex.c,v 1.18 2017/04/01 17:19:40 martin 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_mutex.c,v 1.17 2017/03/23 08:31:00 martin Exp $");
+__RCSID("$NetBSD: t_mutex.c,v 1.18 2017/04/01 17:19:40 martin Exp $");
 
 #include <sys/time.h> /* For timespecadd */
 #include <inttypes.h> /* For UINT16_MAX */
@@ -492,7 +492,8 @@
        PTHREAD_REQUIRE(pthread_join(low, NULL));
        PTHREAD_REQUIRE(pthread_join(high, NULL));
        
-       ATF_REQUIRE_EQ(start, 1);
+       ATF_REQUIRE_EQ_MSG(start, 1, "start = %d, low_cnt =%ju, "
+           "high_cnt = %ju\n", start, high_cnt, low_cnt);
 }
 
 ATF_TC(mutexattr1);



Home | Main Index | Thread Index | Old Index