Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libpthread Do only set a (lower than default) time...



details:   https://anonhg.NetBSD.org/src/rev/e99ca421672f
branches:  trunk
changeset: 763791:e99ca421672f
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 04 14:47:22 2011 +0000

description:
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:

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

diffs (38 lines):

diff -r 16eb2e1083d3 -r e99ca421672f tests/lib/libpthread/t_mutex.c
--- a/tests/lib/libpthread/t_mutex.c    Mon Apr 04 14:33:51 2011 +0000
+++ b/tests/lib/libpthread/t_mutex.c    Mon Apr 04 14:47:22 2011 +0000
@@ -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_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_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)
 {



Home | Main Index | Thread Index | Old Index