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

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:240418-char changing 1 files +2 −2
  1. hebasto commented at 8:30 pm on April 18, 2024: member

    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.

  2. test: Fix `test/streams_tests.cpp` compilation on SunOS / illumos
    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.
    976e5d8f7b
  3. DrahtBot commented at 8:30 pm on April 18, 2024: contributor

    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.

  4. DrahtBot added the label Tests on Apr 18, 2024
  5. maflcko commented at 9:03 am on April 19, 2024: member

    lgtm ACK 976e5d8f7b2bc77cb1443b8bf0f38cb07db70e9b

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

  6. hebasto commented at 7:53 am on April 22, 2024: member
    Friendly ping @theuni @sipa @fanquake :)
  7. theuni approved
  8. theuni commented at 1:40 pm on May 3, 2024: member
    ACK 976e5d8f7b2bc77cb1443b8bf0f38cb07db70e9b. Nice to have the serialization concept actually tested :)
  9. fanquake merged this on May 4, 2024
  10. fanquake closed this on May 4, 2024

  11. hebasto deleted the branch on May 4, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-04 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me