From 231c98c372ef23007f987b1f119a4dc05d46cdcd Mon Sep 17 00:00:00 2001 From: sainimal1ba-hue <230497022+sainimal1ba-hue@users.noreply.github.com> Date: Thu, 12 Nov 2026 15:33:53 +0000 Subject: [PATCH 1/2] gh-161870: Skip test_platform when a 32-bit build sees a different machine name The platform recorded in build-details.json describes the build machine, while sysconfig.get_platform() at test time reports the kernel's machine name, which can differ for a 32-bit process on a 64-bit kernel. --- Lib/test/test_build_details.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_build_details.py b/Lib/test/test_build_details.py index 12b7664d83aae16..17b51497421b7af 100644 --- a/Lib/test/test_build_details.py +++ b/Lib/test/test_build_details.py @@ -78,7 +78,17 @@ def test_base_interpreter(self): self.key('base_interpreter') def test_platform(self): - self.assertEqual(self.key('platform'), sysconfig.get_platform()) + build_platform = self.key('platform') + run_platform = sysconfig.get_platform() + if (build_platform != run_platform + and sys.platform == 'linux' and sys.maxsize < 2**32): + # The platform entry describes the machine the build was made + # on. A 32-bit process on a 64-bit kernel sees the kernel's + # machine name instead ('x86_64' for an i686 build, 'armv8l' or + # 'aarch64' for an armv7l build), so the two can legitimately + # differ (gh-161870). + self.skipTest('the build machine may differ for 32-bit builds') + self.assertEqual(build_platform, run_platform) def test_language_version(self): allowed_characters = string.digits + string.ascii_letters + '.' From d4844c2b8a6d9a45e78e4c015b5171bb87711363 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:21:54 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Tests/2026-11-12-16-21-53.gh-issue-161870.gRmljQ.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tests/2026-11-12-16-21-53.gh-issue-161870.gRmljQ.rst diff --git a/Misc/NEWS.d/next/Tests/2026-11-12-16-21-53.gh-issue-161870.gRmljQ.rst b/Misc/NEWS.d/next/Tests/2026-11-12-16-21-53.gh-issue-161870.gRmljQ.rst new file mode 100644 index 000000000000000..936bc4c654210fc --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-11-12-16-21-53.gh-issue-161870.gRmljQ.rst @@ -0,0 +1 @@ +Skip test_build_details.test_platform when a 32-bit build runs on a machine whose kernel reports a different machine name.