google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
22.56k stars 3.19k forks source link

tests: Fix the expected bin dump of NaN for mips and hppa architectures. #8201

Open cdluminate opened 6 months ago

cdluminate commented 6 months ago

The build fails on mips64el and hppa due to the decimal dump of the testnestedflatbuffer does not match with the hard coded expectation. See the build log as follows:

https://buildd.debian.org/status/fetch.php?pkg=flatbuffers&arch=mips64el&ver=23.5.26%2Bdfsg-1%7Eexp0&stamp=1696723928&raw=0

According to tests/is_quiet_nan.h, the binary value for mips and hppa architectures is 0x7FBFFFFFu, instead of 0x7FC00000u like amd64. Thus, the expected decimal dump should be 255 (FF), 255 (FF), 191 (BF), 127 (7F) instead of 0 (00), 0 (00), 192 (C0), 127 (7F) in little endian format.

cdluminate commented 6 months ago

See https://github.com/google/flatbuffers/pull/6029 for reference.

cdluminate commented 6 months ago

With this patch, flatbuffers can be successfully built for mips64el and hppa architectures. https://buildd.debian.org/status/package.php?p=flatbuffers