Skip to content

Update is_platform_arm() to detect 32-bit arm and other variants #44225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Update is_platform_arm() to detect 32-bit arm and other variants #44225

merged 1 commit into from
Oct 29, 2021

Conversation

thesamesam
Copy link
Contributor

@thesamesam thesamesam commented Oct 29, 2021

  • When running an arm32 ("linux32'd") chroot on an arm64 machine,
    Python's platform.machine() will return "armv8l".

  • In other cases, on "real" arm32, it'll return whatever uname says
    (just like in the first case) which might be e.g. armv7a.

Keeping the other options ("aarch64", "arm64") given that Windows
or other kernels might choose to return different values and these
were added for a reason, but at least this fixes detection on Linux.

This allows tests like test_subtype_integer_errors to be skipped
as intended on arm.

Bug: https://bugs.gentoo.org/818964
Signed-off-by: Sam James sam@gentoo.org

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@thesamesam thesamesam marked this pull request as draft October 29, 2021 11:02
@jreback
Copy link
Contributor

jreback commented Oct 29, 2021

@jreback jreback added ARM aarch64 architecture Testing pandas testing functions or related to the test suite labels Oct 29, 2021
- When running an arm32 ("linux32'd") chroot on an arm64 machine,
  Python's platform.machine() will return "armv8l".

- In other cases, on "real" arm32, it'll return whatever uname says
  (just like in the first case) which might be e.g. armv7a.

Keeping the other options ("aarch64", "arm64") given that Windows
or other kernels might choose to return different values and these
were added for a reason, but at least this fixes detection on Linux.

This allows tests like test_subtype_integer_errors to be skipped
as intended on arm.

Bug: https://bugs.gentoo.org/818964
Signed-off-by: Sam James <sam@gentoo.org>
@thesamesam
Copy link
Contributor Author

app.circleci.com/pipelines/github/pandas-dev/pandas/1865/workflows/32e3f6d0-8386-40e9-9fe1-1a540ae30de5/jobs/32707 looks like 1 test fails on this

Thanks! I wonder why, actually. That test isn't being run conditionally anyway and this PR is supposed to reduce the number of tests we run on ARM, but that doesn't mean it's doing that. Will poke if it fails again after rebasing on master.

@thesamesam
Copy link
Contributor Author

The test from before now passes, so I think it must either be flaky or was fixed on master since (thank goodness!).

The other failing CI just timed out.

@thesamesam thesamesam marked this pull request as ready for review October 29, 2021 16:10
@jreback jreback added this to the 1.4 milestone Oct 29, 2021
@jreback jreback merged commit b0992ee into pandas-dev:master Oct 29, 2021
@jreback
Copy link
Contributor

jreback commented Oct 29, 2021

thanks @thesamesam

@thesamesam
Copy link
Contributor Author

thesamesam commented Nov 1, 2021

Thanks a lot @jreback! By the way, is there a procedure for requesting a backport for this? But no problem if we can't, it is only a small patch for us to carry downstream for a bit.

(This function is only used for checking if we should skip tests)

Cheers!

@thesamesam thesamesam deleted the fix-arm-platform-check branch November 1, 2021 00:25
@jreback
Copy link
Contributor

jreback commented Nov 1, 2021

we only backport regressions

@thesamesam
Copy link
Contributor Author

No problem at all, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM aarch64 architecture Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants