From nobody Thu Sep 18 13:01:27 2025 X-Original-To: dev-commits-src-main@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 4cSG3q6Zwdz68LHW; Thu, 18 Sep 2025 13:01:27 +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 4cSG3q5sBCz3b3m; Thu, 18 Sep 2025 13:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758200487; 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=Gs/IE/VUzGJXzZE+Xwwx4ahAUklmXyUemf2F1TljXZE=; b=eTLAwEJcnWbomP05jCbffLd7sruWsjwIxgRFXp6b8vB01GzZvHXMcL6jBykS+RQHhhswdm cI2eRMuurSP/SIDInktBYVTZeF+LQ1Gs0qyZ4unZxbmN32zAxrJHyb4TybVnpzvfrtxpqR S4pRCsViWqGhdfT5PEIDP0/MLOfEcEPiDDYmBmopH4tJm7+ieyyYo60uw+YPuwN4Di2yC7 1E+TO03f+Aw+QmJtlu5HIGbUt1KuOQQNtS85ysGclrIVsF25a1Av9pDgzX2h4pw0fab+AA FIhWo4zVGkF49H0fnxrISXb921uiaxpjJeVcC95caeoznf+S+WNXMN4KNwqUrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758200487; 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=Gs/IE/VUzGJXzZE+Xwwx4ahAUklmXyUemf2F1TljXZE=; b=FaFPTzHGIuOiGjO/WTwixTSpi/4d0mistfJ3MUl7W1ac9jnuDUl1JZqvGnmTJYG16ftwFF 6q9f1O2YWOvmI2xInTwYoxmxlbBsr6V11o6UpRRFUQ5bPaYfePFJlNYuvfBpxy4M5xHgjX jTEGu46xkzVElMPSx8UVemYlvi2TUniHs1GrdJD7nBZeoPUzbST9GrCQ9KA3affwNHlhnM Plaz6YYHmrNB/8mU+bc1/8/wGdE1wJ1B+OclXoEO94jbUIAYJDSQ4X6yVsCcfm6y8AG0PK f5QL0Q+hgxIG6BqA4jz04Oc9bZ2C5DJOdt+sWW7o12ozkWfY4gB3YPVnjAB4Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758200487; a=rsa-sha256; cv=none; b=nkRok+K53KSCu+fo211YIJ5DgQdcXYgcXJQjwhsCBdREMjKb6GMy+udiiDrSi3WGGJg+hu sQT43FU4HDwZXt2Cjb3W7DvMsfCoDpBMGoL+2t2+FM/8v23RYk5CvBcG1bOk55ATziQY0y vvh9B5yKer4nBHT+st9CLc3RMU8XfKm2NwyNY3km0wYkmcsqFAXlT6cv+PxabQciHbtLBY rnvgoetLpr8ZxfNWWq7v58xBX8KTm5q0fFfGCvdrm/1wOcjet5YKRtt0FPesMAXUtphadr zduFsvAxFf6KzqRA5hHPlq3N5EPgfgKjd6h6NU8dLS9o3V5UnKyJawXHdx4Wrg== 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 4cSG3q5RpJz1BHq; Thu, 18 Sep 2025 13:01:27 +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 58ID1R5h090556; Thu, 18 Sep 2025 13:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ID1RCH090554; Thu, 18 Sep 2025 13:01:27 GMT (envelope-from git) Date: Thu, 18 Sep 2025 13:01:27 GMT Message-Id: <202509181301.58ID1RCH090554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: df997faca841 - main - atf_pytest: fix xfail detection from pytest report List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: df997faca8411bdf8008c25de5db3ed719019d21 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=df997faca8411bdf8008c25de5db3ed719019d21 commit df997faca8411bdf8008c25de5db3ed719019d21 Author: Siva Mahadevan AuthorDate: 2025-09-17 20:34:58 +0000 Commit: Ed Maste CommitDate: 2025-09-18 13:01:14 +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 --- 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"