FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-116622: Fix testPyObjectPrintOSError on Android by mhsmith · Pull Request #122487 · python/cpython · GitHub

/ cpython Public

gh-116622: Fix testPyObjectPrintOSError on Android - #122487

Merged
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-testPyObjectPrintOSError
Jul 31, 2024
Merged

gh-116622: Fix testPyObjectPrintOSError on Android#122487
freakboy3742 merged 3 commits into
python:mainfrom
mhsmith:android-testPyObjectPrintOSError

Conversation

mhsmith commented Jul 30, 2024
edited
Loading

Copy link
Copy Markdown
Member

This test, which was added in #98749, was failing on Android as follows:

17:43:48.804  W  ======================================================================
17:43:48.804  W  FAIL: testPyObjectPrintOSError (test.test_capi.test_object.PrintTest.testPyObjectPrintOSError)
17:43:48.804  W  ----------------------------------------------------------------------
17:43:48.804  W  Traceback (most recent call last):
17:43:48.804  W    File "/data/user/0/org.python.testbed/files/python/lib/python3.13/test/test_capi/test_object.py", line 103, in testPyObjectPrintOSError
17:43:48.804  W      with self.assertRaises(OSError):
17:43:48.804  W          _testcapi.pyobject_print_os_error(output_filename)
17:43:48.804  W  AssertionError: OSError not raised
17:43:48.804  W
17:43:48.804  W  ----------------------------------------------------------------------

This was caused by a recently-fixed bug in OpenBSD's libc, on which Android's libc is based. Luckily there's a simple workaround.

This PR also addresses the comment in #121595 about it being inconvenient to build all architectures before running the testbed. The build script now allows architectures to be missing, as long as at least one is present.

mhsmith commented Jul 30, 2024

Copy link
Copy Markdown
Member Author

CI failure seems unrelated:

freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Annoying, but makes sense to me.

freakboy3742 merged commit 82db572 into python:main Jul 31, 2024

Copy link
Copy Markdown

Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 31, 2024
…2487)

Adds extra handling for way BSD/Android return errors from calls to fwrite.
(cherry picked from commit 82db572)

Co-authored-by: Malcolm Smith <smith@chaquo.com>

bedevere-app Bot commented Jul 31, 2024

Copy link
Copy Markdown

GH-122490 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 31, 2024
freakboy3742 pushed a commit that referenced this pull request Jul 31, 2024
…#122490)

gh-116622: Fix testPyObjectPrintOSError on Android (GH-122487)

Adds extra handling for way BSD/Android return errors from calls to fwrite.
(cherry picked from commit 82db572)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Adds extra handling for way BSD/Android return errors from calls to fwrite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL