GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-116622: Fix testPyObjectPrintOSError on Android by mhsmith · Pull Request #122487 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Jul 30, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

  • Issue: Add support for Android as a target platform #116622

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mhsmith added 2 commits July 30, 2024 20:32
@mhsmith
Make testbed include only those ABIs which have been built
e738689
@mhsmith
Check fwrite return value in PyObject_Print
60046bd
@mhsmith mhsmith added the needs backport to 3.13 only security fixes label Jul 30, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Jul 30, 2024
Add support for Android as a target platform #116622
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Jul 30, 2024
@mhsmith
mhsmith requested a review from freakboy3742 July 30, 2024 22:39
@mhsmith
Add news entry
0ef9dfc
@mhsmith

mhsmith commented Jul 30, 2024

Copy link
Copy Markdown
Member Author

CI failure seems unrelated:

  • Thread sanitizer tests failing in GitHub actions #121946
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

freakboy3742
freakboy3742 approved these changes Jul 31, 2024
View reviewed changes

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Annoying, but makes sense to me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jul 31, 2024
@freakboy3742
freakboy3742 merged commit 82db572 into python:main Jul 31, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Jul 31, 2024
@miss-islington-app

miss-islington-app Bot commented 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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 31, 2024
@mhsmith @miss-islington
pythongh-116622: Fix testPyObjectPrintOSError on Android (pythonGH-12…
c00c340
…2487)

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

Co-authored-by: Malcolm Smith <[email protected]>
@bedevere-app

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jul 31, 2024
freakboy3742 pushed a commit that referenced this pull request Jul 31, 2024
@miss-islington @mhsmith
[3.13] gh-116622: Fix testPyObjectPrintOSError on Android (GH-122487) (…
5212624
…#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 <[email protected]>
@mhsmith mhsmith mentioned this pull request Aug 8, 2024
gh-116622: Add Android test script #121595
Merged
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
@mhsmith @blhsing
pythongh-116622: Fix testPyObjectPrintOSError on Android (python#122487)
d8fcf67
Adds extra handling for way BSD/Android return errors from calls to fwrite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@freakboy3742 freakboy3742 freakboy3742 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mhsmith @freakboy3742
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.