-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-46623: Skip two test_zlib tests on s390x #31096
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
Conversation
Skip test_pair() and test_speech128() of test_zlib on s390x since they fail if zlib uses the s390x hardware accelerator.
The tests check round-trip as well as compression, though. |
# | ||
# Make the assumption that s390x always has an accelerator to simplify the | ||
# skip condition. Don't skip on Windows which doesn't have os.uname(). | ||
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x', |
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.
To implementing Petr's comment suggestion:
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x', | |
def not_s390x(): | |
return not (hasattr(os, 'uname') and os.uname().machine == 's390x') |
and replace @skip...
s below with if not_s390x:
on assert
s.
I got access to a s390x machine (RHEL8), sadly it didn't have the zlib hardware optimization and so test_zlib just passed. I agree that it's not ideal to always skip 2 tests on s390x. But the test is run on all other architectures and all other test_zlib tests are still run. An alternative would be to remove the tests which make too many assumptions about compressed data. For now, I prefer to just skip the tests. If someone knows how to detect the hardware accelerator or wants to enhance the tests, please go ahead and write a PR ;-) |
Even if Python 3.9 and 3.10 are also affected, I prefer to not backport the change since it's not ideal. |
Skip test_pair() and test_speech128() of test_zlib on s390x since they fail if zlib uses the s390x hardware accelerator.
…, skip checking the compressed bytes (pythonGH-125042) This backports two commits: - pythonGH-31096 skipped the tests unconditionally - pythonGH-125042 skips only the possibly-failing assertion (cherry picked from commit cc5a225)
…ration, skip checking the compressed bytes (pythonGH-125042) This backports two commits: - pythonGH-31096 skipped the tests unconditionally - pythonGH-125042 skips only the possibly-failing assertion (cherry picked from commit d522856) Co-authored-by: Petr Viktorin <encukou@gmail.com>
…p checking the compressed bytes (GH-125042) (#125585) gh-125041: gh-90781: test_zlib: For s390x HW acceleration, skip checking the compressed bytes (GH-125042) This backports two commits: - GH-31096 skipped the tests unconditionally - GH-125042 skips only the possibly-failing assertion (cherry picked from commit cc5a225)
Skip test_pair() and test_speech128() of test_zlib on s390x since
they fail if zlib uses the s390x hardware accelerator.
https://bugs.python.org/issue46623