Source-Changes-HG archive

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

[src/pgoyette-localcount]: src/tests/lib/libpthread Import test fix from HEAD.



details:   https://anonhg.NetBSD.org/src/rev/c58001b388b9
branches:  pgoyette-localcount
changeset: 852893:c58001b388b9
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Aug 01 07:39:23 2016 +0000

description:
Import test fix from HEAD.

With this, a complete test run on HEAD vs the localcount branch yields
identical lists of "Failed test cases" and "Expected failures"

diffstat:

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

diffs (53 lines):

diff -r 7070eab3cbdd -r c58001b388b9 tests/lib/libpthread/t_mutex.c
--- a/tests/lib/libpthread/t_mutex.c    Sun Jul 31 13:12:59 2016 +0000
+++ b/tests/lib/libpthread/t_mutex.c    Mon Aug 01 07:39:23 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mutex.c,v 1.9 2016/07/06 14:42:53 christos Exp $ */
+/* $NetBSD: t_mutex.c,v 1.9.2.1 2016/08/01 07:39:23 pgoyette 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.9 2016/07/06 14:42:53 christos Exp $");
+__RCSID("$NetBSD: t_mutex.c,v 1.9.2.1 2016/08/01 07:39:23 pgoyette Exp $");
 
 #include <pthread.h>
 #include <stdio.h>
@@ -318,7 +318,7 @@
 
        printf("child is waiting\n");
        res = _sched_protect(-2);
-       ATF_REQUIRE_EQ(res, -1);
+       ATF_REQUIRE_EQ_MSG(res, -1, "sched_protect returned %d", res);
        ATF_REQUIRE_EQ(errno, ENOENT);
        PTHREAD_REQUIRE(pthread_mutex_lock(&mutex5));
        printf("child is owning resource\n");
@@ -334,6 +334,7 @@
 ATF_TC_HEAD(mutex5, tc)
 {
        atf_tc_set_md_var(tc, "descr", "Checks mutexes for priority setting");
+       atf_tc_set_md_var(tc, "require.user", "root");
 }
 
 ATF_TC_BODY(mutex5, tc)
@@ -352,7 +353,8 @@
        printf("previous policy used = %d\n", res);
 
        res = sched_getscheduler(getpid());
-       ATF_REQUIRE_EQ(res, 1);
+       ATF_REQUIRE_EQ_MSG(res, SCHED_FIFO, "sched %d != FIFO %d", res, 
+           SCHED_FIFO);
 
        PTHREAD_REQUIRE(pthread_mutexattr_init(&attr5));
        PTHREAD_REQUIRE(pthread_mutexattr_setprotocol(&attr5,
@@ -444,6 +446,7 @@
 {
        atf_tc_set_md_var(tc, "descr",
            "Checks scheduling for priority ceiling");
+       atf_tc_set_md_var(tc, "require.user", "root");
 }
 
 /*



Home | Main Index | Thread Index | Old Index