From owner-svn-src-stable@freebsd.org Sat Aug 19 01:49:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D445DE87CD; Sat, 19 Aug 2017 01:49:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F047B8385E; Sat, 19 Aug 2017 01:49:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7J1nA9S046602; Sat, 19 Aug 2017 01:49:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7J1nAqN046601; Sat, 19 Aug 2017 01:49:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708190149.v7J1nAqN046601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 19 Aug 2017 01:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r322691 - stable/11/tests/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: stable/11/tests/sys/kern X-SVN-Commit-Revision: 322691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2017 01:49:11 -0000 Author: ngie Date: Sat Aug 19 01:49:09 2017 New Revision: 322691 URL: https://svnweb.freebsd.org/changeset/base/322691 Log: MFC r321959: Annotate tests that require root privileges appropriately This unbreaks running the tests with unprivileged users. Modified: stable/11/tests/sys/kern/ptrace_test.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/kern/ptrace_test.c ============================================================================== --- stable/11/tests/sys/kern/ptrace_test.c Sat Aug 19 01:45:02 2017 (r322690) +++ stable/11/tests/sys/kern/ptrace_test.c Sat Aug 19 01:49:09 2017 (r322691) @@ -1867,7 +1867,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; @@ -1961,7 +1966,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; @@ -2939,13 +2949,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) {