Anybody testing/using Big endian?

Fred Wright fw at fwright.net
Sun Aug 26 00:23:02 UTC 2018


On Fri, 24 Aug 2018, Hal Murray via devel wrote:

> On a PowerPC:
>
> TEST(numtoa, RefidStr)../../tests/libntp/numtoa.c:19::FAIL: Expected
> '68.51.34.17' Was '17.34.51.68'
>
> It's probably a bug in the test code.

Yes, it is.  The argument to refid_str() is expected to be in network byte 
order, but the tests (added in ed5d672c8) are supplying it in byte-swapped 
host byte order, which is only valid on little-endian processors.  Both 
tests are broken, but it stops after the first failure.

See:

 	https://gitlab.com/NTPsec/ntpsec/merge_requests/776

Fred Wright


More information about the devel mailing list