-
-
Notifications
You must be signed in to change notification settings - Fork 902
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
test/helper.rb: ignore GC compaction on unsupported platforms #2532
test/helper.rb: ignore GC compaction on unsupported platforms #2532
Conversation
If you look at the method |
I'd prefer a PR that did the appropriate checks in |
For example, ruby 3.0 on Debian ppc64el architecture does not support GC compaction. When running the tests, every 20th test crashes like this: > Error: > Minitest::Result#test_parsing_attribute_namespace: > NotImplementedError: Compaction isn't available on this platform > <internal:gc>:213:in `compact' > /home/terceiro/ruby-nokogiri-1.13.5+dfsg/test/helper.rb:123:in `teardown'
d3fdd38
to
203176b
Compare
When compaction is not supported, those methods are defined, but raise
For that, you would need to actuall call GC.compact at the beginning. I just sent an updated patch, let me know what you think. |
This seems like a reasonable approach. |
I agree, this looks good! I've just kicked off CI. I'm wondering if it would be worth running CI on ppc64le (using qemu like we do for native gem installations) ... |
Little endian PowerPC seems like a pretty esoteric platform. Maybe something that runs periodically but not on every commit? |
I'm curious if there's a way I can easily reproduce what you're seeing? I'm trying the
|
Ah, never mind, I compiled a custom version of ruby with GC_COMPACTION_SUPPORTED set to 0 and I'm testing it that way. |
@terceiro Thanks for this! Merging. |
Note for posterity, this was reported upstream in https://bugs.ruby-lang.org/issues/18779 |
For example, ruby 3.0 on Debian ppc64el architecture does not support GC
compaction. When running the tests, every 20th test crashes like this: