Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libpthread Adjust cond_timedwait_race to take acco...
details: https://anonhg.NetBSD.org/src/rev/5030171af407
branches: trunk
changeset: 934382:5030171af407
user: ad <ad%NetBSD.org@localhost>
date: Wed Jun 10 21:46:50 2020 +0000
description:
Adjust cond_timedwait_race to take account of spurious wakeups (which are
completely legit).
diffstat:
tests/lib/libpthread/t_cond.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 13cf764bf785 -r 5030171af407 tests/lib/libpthread/t_cond.c
--- a/tests/lib/libpthread/t_cond.c Wed Jun 10 20:26:52 2020 +0000
+++ b/tests/lib/libpthread/t_cond.c Wed Jun 10 21:46:50 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_cond.c,v 1.7 2016/07/03 14:24:59 christos Exp $ */
+/* $NetBSD: t_cond.c,v 1.8 2020/06/10 21:46:50 ad 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.7 2016/07/03 14:24:59 christos Exp $");
+__RCSID("$NetBSD: t_cond.c,v 1.8 2020/06/10 21:46:50 ad Exp $");
#include <sys/time.h>
@@ -329,7 +329,7 @@
* Sometimes we catch ESRCH.
* This should never happen.
*/
- ATF_REQUIRE(rv == ETIMEDOUT);
+ ATF_REQUIRE(rv == ETIMEDOUT || rv == 0);
PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex));
}
}
Home |
Main Index |
Thread Index |
Old Index