envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Fix zipkin_test on big-endian systems

Open pandurangkhandeparker opened this issue 1 year ago • 1 comments

Commit Message: Fix //test/extensions/tracers/zipkin:zipkin_test on big-endian systems.

Additional Description: The subtest "ZipkinSpanBufferTest.SerializeSpan" was failing due to discrepancies in the id field of the expected JSON string and the serialized JSON representation. The expected id was AQAAAAAAAAA= but we were getting AAAAAAAAAAE= on s390x. This was only occurring when serializing the buffer with HTTP_PROTO whereas HTTP_JSON was working fine. On checking more into the serialized MessageToJsonString, I found that the hexadecimal representation of id was id: "\000\000\000\000\000\000\000\001" which is id:"AAAAAAAAAAE=" on s390x and that on Intel was id: "\001\000\000\000\000\000\000\000" which is id:"AQAAAAAAAAA=" . Further found that this is occurring due to endianness, and the value of id on both Intel and s390x is same in respective endianness and because the expected content is hard coded in little-endian format, it was failing on big-endian system.

Signed-off-by: Pandurang Khandeparker [email protected]

Risk Level: Low Testing: Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional API Considerations:]

pandurangkhandeparker avatar May 31 '24 09:05 pandurangkhandeparker

Hi @pandurangkhandeparker, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/34448 was opened by pandurangkhandeparker.

see: more, trace.

/retest

wbpcode avatar May 31 '24 11:05 wbpcode

/retest

adisuissa avatar Jun 04 '24 13:06 adisuissa