summaryrefslogtreecommitdiff
path: root/tests/lib/libpthread/t_mutex.c
diff options
context:
space:
mode:
authormartin <martin@NetBSD.org>2011-04-04 14:47:22 +0000
committermartin <martin@NetBSD.org>2011-04-04 14:47:22 +0000
commit0a3f100fbb00a89d55fdbabd754e6e96ff3d9d0a (patch)
tree24988a1389563ea5c9a3a8aa60b9292cedc4febe /tests/lib/libpthread/t_mutex.c
parentbaca298c5ee62237b7b57dbfb0bb51084d225722 (diff)
Do only set a (lower than default) timeout value if we are on powerpc and
expect to run into a real deadrun ofter. The (too short) timeout otherwise makes slower archs fail.
Diffstat (limited to 'tests/lib/libpthread/t_mutex.c')
-rw-r--r--tests/lib/libpthread/t_mutex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/libpthread/t_mutex.c b/tests/lib/libpthread/t_mutex.c
index e9075cef4cc..862923179a7 100644
--- a/tests/lib/libpthread/t_mutex.c
+++ b/tests/lib/libpthread/t_mutex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.4 2011/02/21 21:43:41 riz Exp $ */
+/* $NetBSD: t_mutex.c,v 1.5 2011/04/04 14:47:22 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.4 2011/02/21 21:43:41 riz Exp $");
+__RCSID("$NetBSD: t_mutex.c,v 1.5 2011/04/04 14:47:22 martin Exp $");
#include <pthread.h>
#include <stdio.h>
@@ -118,7 +118,8 @@ ATF_TC(mutex2);
ATF_TC_HEAD(mutex2, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks mutexes");
- atf_tc_set_md_var(tc, "timeout", "40");
+ if (strcmp(atf_config_get("atf_arch"), "powerpc") == 0)
+ atf_tc_set_md_var(tc, "timeout", "40");
}
ATF_TC_BODY(mutex2, tc)
{
@@ -189,7 +190,8 @@ ATF_TC_HEAD(mutex3, tc)
{
atf_tc_set_md_var(tc, "descr", "Checks mutexes using a static "
"initializer");
- atf_tc_set_md_var(tc, "timeout", "40");
+ if (strcmp(atf_config_get("atf_arch"), "powerpc") == 0)
+ atf_tc_set_md_var(tc, "timeout", "40");
}
ATF_TC_BODY(mutex3, tc)
{