ReadStat icon indicating copy to clipboard operation
ReadStat copied to clipboard

Support writing of cross-endian files

Open evanmiller opened this issue 8 years ago • 4 comments

Currently little-endian machines can only write little-endian files, and big-endian machines can write only big-endian files. Support for cross-endian writes will let us bring cross-endian reads under test coverage.

evanmiller avatar Aug 01 '16 17:08 evanmiller

FWIW, the haven test suite passes on s390x, a big endian architecture. I don't know if any of the tests actually exercise endianness, though.

QuLogic avatar May 17 '19 08:05 QuLogic

@QuLogic Thanks, good to know. The tests all write to their native endianness and read from the same, so there are still untested code paths.

evanmiller avatar May 17 '19 11:05 evanmiller

Ah, I was hoping some of those existing files in the test suite might have exercised this code path.

QuLogic avatar May 17 '19 23:05 QuLogic

I should have clarified - the ReadStat tests are all native roundtrips. I believe the haven tests use a suite of files, and therefore will test at least some of the byteswapping code paths on a big-endian machine.

I don't know how comprehensive the haven tests are, however.

evanmiller avatar May 18 '19 10:05 evanmiller