From nobody Tue Sep 30 16:58:49 2025 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbkmB2jm8z69LmX; Tue, 30 Sep 2025 16:58:50 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbkmB0qTkz45qn; Tue, 30 Sep 2025 16:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759251530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDw1C4NPrHOpdVWY90wV2zSGWDRMNS19MlW46Wlw6yE=; b=xD6uUs49Xe2QnLIiv43cnRWMch+ZAarlTyxG/d3zqKnJBLPhus0H3zFwuAhfzRjdCT/OG4 UEuvyLeeEacNV8WMZArsUwF4eavrM3bIgLtmUvtTvMPrrf9IToiytLyVbrT702QlyPi/Lo fE+mdmH8q/5LZutaTw0oZ6ybGUwUbPVyE/cYwCObr1/B8qUdNIOuwI1RqYTWiGOTQc0VyL 3DZkkxTUTVSkmxrq/5UXbbKPBs0CpI1LniBnUxR9Pd1PmPTXhbdUw0ee5qYg4MmWnFa9Ns UhjSQMAdtjT6nwIjrIPL9vdn0I+hI1iGUc1Yek3pBwuTJzv7NIeEj9XzzuwirQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759251530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDw1C4NPrHOpdVWY90wV2zSGWDRMNS19MlW46Wlw6yE=; b=tJLysFFTZFXkttEp0nOM7uMazOybE8suklWX8jhmr2uIF6h3MJJHUX6ltU0fzbBuQ19Upv Y2xRTMfTFyQv9OmxPZ3TMf6hWq/mXk09pbX5oAc8PZOxq7UR8fk3nyXRjZPN+16fVWzCzD DP1Ad4t/gIGeyBwd3S39WFEobQlmBXrij0hDUD5NsVTm+CM8bt2/qVPabZjr4Y5TL8TkaV oLoHoUpmz4xIMCoQ2w+oSl6metWh7zZwPsKjDwuf2Ew7coszceZ6+7xtlVawxJMnwxVW6Y hcsYjt7rjiOCjde8icMqGW+MV0PZCmGBd/bvT1z+8aANHvN+0wyKl0aoNYpdOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759251530; a=rsa-sha256; cv=none; b=X3fw5w5fneCEc0jYWDqmA6RAlwXfrGpvSAy/9HrTJWAv1eCnUlVYv1sYXDKpQM54lFctck ILVxREUmrzx6C03Jma/91/HmltXoHJjIMhvW5oIiwtMgSaPzSzRA/METOK3YFBpuD8dZHR exC4jknIgPjrNDSTuCP6FItjNRPtgi3qoLWxkMDP1pgx17R+aRjvCzNIOMY/3dLWNh+s9/ qD3XeeiUvBbpS5Xa/nErC62DEe6SYQi+cDhhOW8zOpMCvEoD3DcVZ9fmsRelMAg9oFnNHT HLgk3B7YJT+zud3Ov3O5CQgvwe1EBp9YGRNQpfD86uSnLxJXMgp3sXsVO0IuyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cbkmB0P2Dzm3D; Tue, 30 Sep 2025 16:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UGwnVW018762; Tue, 30 Sep 2025 16:58:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UGwnaQ018759; Tue, 30 Sep 2025 16:58:49 GMT (envelope-from git) Date: Tue, 30 Sep 2025 16:58:49 GMT Message-Id: <202509301658.58UGwnaQ018759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6f0d113e7ed8 - stable/15 - atf_pytest: fix xfail detection from pytest report List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6f0d113e7ed804a59ef3e9ff1040ea86882a8391 Auto-Submitted: auto-generated The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6f0d113e7ed804a59ef3e9ff1040ea86882a8391 commit 6f0d113e7ed804a59ef3e9ff1040ea86882a8391 Author: Siva Mahadevan AuthorDate: 2025-09-17 20:34:58 +0000 Commit: Ed Maste CommitDate: 2025-09-30 16:58:15 +0000 atf_pytest: fix xfail detection from pytest report The location of the 'wasxfail' attribute was moved from the 'reason' attribute back to the parent 'report'. This fixes an issue where xfails are wrongly reported to ATF as skipped tests. Signed-off-by: Siva Mahadevan Pull-request: https://github.com/freebsd/freebsd-src/pull/1849 Sponsored by: The FreeBSD Foundation (cherry picked from commit df997faca8411bdf8008c25de5db3ed719019d21) --- tests/atf_python/atf_pytest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/atf_pytest.py b/tests/atf_python/atf_pytest.py index 19b5f88fa200..02ed502ace67 100644 --- a/tests/atf_python/atf_pytest.py +++ b/tests/atf_python/atf_pytest.py @@ -256,7 +256,7 @@ class ATFHandler(object): # Record failure & override "skipped" state self.set_report_state(test_name, state, reason) elif state == "skipped": - if hasattr(reason, "wasxfail"): + if hasattr(report, "wasxfail"): # xfail() called in the test body state = "expected_failure" else: @@ -264,7 +264,7 @@ class ATFHandler(object): pass self.set_report_state(test_name, state, reason) elif state == "passed": - if hasattr(reason, "wasxfail"): + if hasattr(report, "wasxfail"): # the test was expected to fail but didn't # mark as hard failure state = "failed"