Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2017 22:19:45 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321959 - head/tests/sys/kern
Message-ID:  <201708022219.v72MJjHe064707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Aug  2 22:19:45 2017
New Revision: 321959
URL: https://svnweb.freebsd.org/changeset/base/321959

Log:
  Annotate tests that require root privileges appropriately
  
  This unbreaks running the tests with unprivileged users.
  
  MFC after:	1 week

Modified:
  head/tests/sys/kern/ptrace_test.c

Modified: head/tests/sys/kern/ptrace_test.c
==============================================================================
--- head/tests/sys/kern/ptrace_test.c	Wed Aug  2 22:08:49 2017	(r321958)
+++ head/tests/sys/kern/ptrace_test.c	Wed Aug  2 22:19:45 2017	(r321959)
@@ -1868,7 +1868,12 @@ mask_usr1_thread(void *arg)
  * Verify that the SIGKILL from PT_KILL takes priority over other signals
  * and prevents spurious stops due to those other signals.
  */
-ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_signal);
+ATF_TC(ptrace__PT_KILL_competing_signal);
+ATF_TC_HEAD(ptrace__PT_KILL_competing_signal, tc)
+{
+
+	atf_tc_set_md_var(tc, "require.user", "root");
+}
 ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc)
 {
 	pid_t fpid, wpid;
@@ -1962,7 +1967,12 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc)
  * Verify that the SIGKILL from PT_KILL takes priority over other stop events
  * and prevents spurious stops caused by those events.
  */
-ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_stop);
+ATF_TC(ptrace__PT_KILL_competing_stop);
+ATF_TC_HEAD(ptrace__PT_KILL_competing_stop, tc)
+{
+
+	atf_tc_set_md_var(tc, "require.user", "root");
+}
 ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc)
 {
 	pid_t fpid, wpid;
@@ -2940,13 +2950,24 @@ terminate_with_pending_sigstop(bool sigstop_from_main_
  * to the older thread (the second test). This behavior has changed in the
  * past, so make no assumption.
  */
-ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop1);
+ATF_TC(ptrace__parent_terminate_with_pending_sigstop1);
+ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop1, tc)
+{
+
+	atf_tc_set_md_var(tc, "require.user", "root");
+}
 ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop1, tc)
 {
 
 	terminate_with_pending_sigstop(true);
 }
-ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop2);
+
+ATF_TC(ptrace__parent_terminate_with_pending_sigstop2);
+ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop2, tc)
+{
+
+	atf_tc_set_md_var(tc, "require.user", "root");
+}
 ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop2, tc)
 {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708022219.v72MJjHe064707>