Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libpthread we require root for sched_fifo, and mor...
details: https://anonhg.NetBSD.org/src/rev/c06956da8e11
branches: trunk
changeset: 346740:c06956da8e11
user: christos <christos%NetBSD.org@localhost>
date: Sun Jul 31 13:01:29 2016 +0000
description:
we require root for sched_fifo, and more verbose messages.
diffstat:
tests/lib/libpthread/t_mutex.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (53 lines):
diff -r 267012406009 -r c06956da8e11 tests/lib/libpthread/t_mutex.c
--- a/tests/lib/libpthread/t_mutex.c Sun Jul 31 12:17:36 2016 +0000
+++ b/tests/lib/libpthread/t_mutex.c Sun Jul 31 13:01:29 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.10 2016/07/31 13:01:29 christos 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.10 2016/07/31 13:01:29 christos 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