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: Test updates for Android by mhsmith · Pull Request #117299 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented Mar 27, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

This PR fixes various Android test issues which I've discovered over the last few weeks.

  • 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 4 commits March 27, 2024 19:45
@mhsmith
Re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all A…
6c625e6
…ndroid ABIs
@mhsmith
Use support.setswitchinterval in all relevant tests
c8914cf
@mhsmith
Skip test_fma_zero_result on Android x86_64
384f7e1
@mhsmith
Accept EACCES when calling os.get_terminal_size on Android
236e9d0
@mhsmith
mhsmith requested review from brettcannon, ericsnowcurrently, gpshead, ncoghlan and warsaw as code owners March 27, 2024 19:56
@bedevere-app bedevere-app Bot added the awaiting review label Mar 27, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Mar 27, 2024
Add support for Android as a target platform #116622
Closed
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Mar 27, 2024
mhsmith
mhsmith commented Mar 27, 2024
View reviewed changes
Comment thread Lib/test/_test_multiprocessing.py Resolved

Uh oh!

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

Comment thread Lib/test/test_fcntl.py Resolved

Uh oh!

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

Comment thread Lib/test/test_math.py
Comment on lines +2696 to 2700
@unittest.skipIf(
sys.platform.startswith(("freebsd", "wasi"))
or (sys.platform == "android" and platform.machine() == "x86_64"),
f"this platform doesn't implement IEE 754-2008 properly")
def test_fma_zero_result(self):

@mhsmith mhsmith Mar 27, 2024

Copy link
Copy Markdown
Member Author

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.

See discussion at #116667 (comment).

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@mhsmith mhsmith added the skip news label Mar 27, 2024
@mhsmith

mhsmith commented Apr 4, 2024

Copy link
Copy Markdown
Member Author

@erlend-aasland: Are you able to review this PR? It's a continuation of the previous Android test updates from #115918.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes Apr 5, 2024
View reviewed changes

@erlend-aasland erlend-aasland 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.

LGTM, with some nits. BTW, last time I checked, the sys.platform.startswith idiom was still recommended practice. I'd prefer if we could follow that.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_os.py Outdated
# The Android testbed redirects the native stdout to a pipe,
# which returns a different error code.
known_errnos.append(errno.EACCES)
if (sys.platform == "win32") or (e.errno in known_errnos):

@erlend-aasland erlend-aasland Apr 5, 2024

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.

The parentheses are not needed.

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 Apr 5, 2024
@mhsmith
Remove unnecessary parentheses
69ac1f6
@mhsmith

mhsmith commented Apr 5, 2024

Copy link
Copy Markdown
Member Author

The parentheses are not needed.

Fixed.

last time I checked, the sys.platform.startswith idiom was still recommended practice

I actually updated the sys.platform documentation in #116215 (comment) to limit this recommendation to FreeBSD. Ever since Python 3.3, all other PEP 11-supported platforms have returned a fixed string without a version number.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland

erlend-aasland commented Apr 5, 2024

Copy link
Copy Markdown
Contributor

@mhsmith, thanks for the heads-up, I missed that docs update (and I've must have looked at the 3.12 docs). Perhaps we should consider backporting that doc patch.

All reactions

Sorry, something went wrong.

Uh oh!

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

erlend-aasland
erlend-aasland approved these changes Apr 5, 2024
View reviewed changes
@erlend-aasland
erlend-aasland enabled auto-merge (squash) April 5, 2024 20:54
@erlend-aasland
erlend-aasland merged commit 1d3225a into python:main Apr 5, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 5, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@mhsmith @diegorusso
pythongh-116622: Test updates for Android (python#117299)
9943b31
- re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all
  Android ABIs
- use support.setswitchinterval in all relevant tests
- skip test_fma_zero_result on Android x86_64
- accept EACCES when calling os.get_terminal_size on Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes
@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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 @erlend-aasland
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.