Skip to content
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

Fix alignment tests for targets with pointer width < 8 bytes #28

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

frazar
Copy link
Contributor

@frazar frazar commented Oct 6, 2022

The alignment tests relied on the fact that the pointer width is 8 bytes, which is not the case for i686.
Fix the alignment tests so that they work on targets with pointer width of 4 or even 2 bytes.

Fixes #21

@google-cla
Copy link

google-cla bot commented Oct 6, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@frazar frazar force-pushed the fix-alignment-test branch 2 times, most recently from bb4e3fe to 8e3852c Compare October 6, 2022 20:41
@frazar frazar changed the title Fix alignment tests for target with pointer width < 8 bytes Fix alignment tests for targets with pointer width < 8 bytes Oct 6, 2022
@frazar frazar force-pushed the fix-alignment-test branch 2 times, most recently from 2c30281 to 392f850 Compare October 6, 2022 20:54
src/lib.rs Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@joshlf
Copy link
Member

joshlf commented Oct 6, 2022

Awesome, thanks so much for this, @frazar ! Welcome to zerocopy 😃

A few small nits, but this looks great!

@frazar
Copy link
Contributor Author

frazar commented Oct 7, 2022

Thank you for your review and your nice words!

Should be ready for merge now.

src/lib.rs Outdated Show resolved Hide resolved
@joshlf
Copy link
Member

joshlf commented Oct 7, 2022

np! One more small nit and we should be ready to merge.

The alignment tests relied on the fact that the pointer width is 8
bytes, which is not the case for i686.
Fix the alignment tests so that they work on targets with pointer
width of 4 or even 2 bytes.

Fixes google#21
@frazar
Copy link
Contributor Author

frazar commented Oct 7, 2022

Added the dots to the comments, should be ok now.

@joshlf joshlf merged commit bb81901 into google:main Oct 7, 2022
@frazar frazar deleted the fix-alignment-test branch October 10, 2022 20:14
frazar added a commit to frazar/zerocopy that referenced this pull request Oct 10, 2022
The test_new_error() tests were disabled on i686 targets due to Issue google#21.
This issue has fixed in google#28, but the test was not re-enabled.
frazar added a commit to frazar/zerocopy that referenced this pull request Oct 10, 2022
The test_new_error() test was disabled for i686 due to Issue google#21. This
issue was fixed in google#28, but the test was not re-enabled.
frazar added a commit to frazar/zerocopy that referenced this pull request Oct 10, 2022
The test_new_error() test was disabled for i686 due to Issue google#21. This
issue has since been fixed in google#28, but the test was not re-enabled.
joshlf pushed a commit that referenced this pull request Oct 10, 2022
The test_new_error() test was disabled for i686 due to Issue #21. This
issue has since been fixed in #28, but the test was not re-enabled.
joshlf pushed a commit that referenced this pull request Aug 3, 2023
The alignment tests relied on the fact that the pointer width is 8
bytes, which is not the case for i686. Fix the alignment tests so
that they work on targets with pointer width of 4 or even 2 bytes.

Fixes #21
joshlf pushed a commit that referenced this pull request Aug 3, 2023
The test_new_error() test was disabled for i686 due to Issue #21. This
issue has since been fixed in #28, but the test was not re-enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_new_error fails on i686
2 participants