From owner-dev-commits-src-branches@freebsd.org Wed Mar 17 14:05:29 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 152C2569503; Wed, 17 Mar 2021 14:05:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0sPM5d1Vz3stg; Wed, 17 Mar 2021 14:05:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63A02103BB; Wed, 17 Mar 2021 14:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12HE5Ou6086120; Wed, 17 Mar 2021 14:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12HE5O5E086119; Wed, 17 Mar 2021 14:05:24 GMT (envelope-from git) Date: Wed, 17 Mar 2021 14:05:24 GMT Message-Id: <202103171405.12HE5O5E086119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 80c34bad1979 - stable/13 - Remove atf_tc_skip calls from ptrace_test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 80c34bad19795b6f4ddf9d6e339cf600118f05b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 14:05:29 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=80c34bad19795b6f4ddf9d6e339cf600118f05b0 commit 80c34bad19795b6f4ddf9d6e339cf600118f05b0 Author: Alex Richardson AuthorDate: 2021-03-01 18:51:02 +0000 Commit: Alex Richardson CommitDate: 2021-03-17 12:24:02 +0000 Remove atf_tc_skip calls from ptrace_test I've run these tests many times in a loop on multiple architectures and it works reliably for me, maybe it's time to retire these skips? This also adds an additional waitpid to one of the tests to avoid a potential race condition (suggested by markj@). PR: 239397, 244056, 239425, 240510, 220841, 243605 Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D28888 (cherry picked from commit 1032131464f1196ad674b30c14a9e611789a1061) --- tests/sys/kern/ptrace_test.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index a5655008eaa1..c6183ed573fd 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -237,9 +237,6 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) int cpipe[2], status; char c; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/244055"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -287,9 +284,6 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) int cpipe[2], dpipe[2], status; char c; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239399"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); @@ -493,9 +487,6 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) int cpipe1[2], cpipe2[2], gcpipe[2], status; pid_t child, gchild; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/244056"); - REQUIRE_EQ(pipe(cpipe1), 0); REQUIRE_EQ(pipe(cpipe2), 0); REQUIRE_EQ(pipe(gcpipe), 0); @@ -834,9 +825,6 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239397"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -905,9 +893,6 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239292"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -971,9 +956,6 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239425"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -1036,9 +1018,6 @@ ATF_TC_BODY(ptrace__getppid, tc) int cpipe[2], dpipe[2], status; char c; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/240510"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); @@ -2123,9 +2102,6 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) struct ptrace_lwpinfo pl; struct sched_param sched_param; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/220841"); - ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); @@ -4219,9 +4195,6 @@ ATF_TC_BODY(ptrace__procdesc_reparent_wait_child, tc) pid_t traced, debuger, wpid; int pd, status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/243605"); - traced = pdfork(&pd, 0); ATF_REQUIRE(traced >= 0); if (traced == 0) { @@ -4230,6 +4203,8 @@ ATF_TC_BODY(ptrace__procdesc_reparent_wait_child, tc) } ATF_REQUIRE(pd >= 0); + /* Wait until the child process has stopped before fork()ing again. */ + REQUIRE_EQ(traced, waitpid(traced, &status, WSTOPPED)); debuger = fork(); ATF_REQUIRE(debuger >= 0); if (debuger == 0) {