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

test: Fix test/streams_tests.cpp compilation on SunOS / illumos #29907

Merged
merged 1 commit into from May 4, 2024

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Apr 18, 2024

On systems where int8_t is defined as char, the {S,Uns}erialize(Stream&, signed char) functions become undefined.

This PR resolves the issue by testing {S,Uns}erialize(Stream&, int8_t) instead.

No behavior change on systems where int8_t is defined as signed char, which is the case for most other systems.

Fixes #29884.

An alternative approach is mentioned in #29884 (comment) as well.

On systems where `int8_t` is defined as `char`, the
`{S,Uns}erialize(Stream&, signed char)` functions become undefined.

This change resolves the issue by testing
`{S,Uns}erialize(Stream&, int8_t)` instead.

No behavior change on systems where `int8_t` is defined as
`signed char`, which is the case for most other systems.
@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 18, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko, theuni

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@maflcko
Copy link
Member

maflcko commented Apr 19, 2024

lgtm ACK 976e5d8

int8_t is also what real, non-test code should use.

@hebasto
Copy link
Member Author

hebasto commented Apr 22, 2024

Friendly ping @theuni @sipa @fanquake :)

Copy link
Member

@theuni theuni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 976e5d8. Nice to have the serialization concept actually tested :)

@fanquake fanquake merged commit 61d3280 into bitcoin:master May 4, 2024
16 checks passed
@hebasto hebasto deleted the 240418-char branch May 4, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test/streams_tests.cpp fails to compile on SunOS / illumos
5 participants