Open Ortham opened 8 years ago
I screwed up my local Linux VM, so installed Ubuntu Server 16.04 in a new VM, and didn't encounter any zlib buffer errors, so I'm going to try with a 12.04 image (which is what Travis runs). The only relevant difference I know of is that 12.04's Boost libraries are built using GCC 4, but libbsa is built with GCC 5, whereas 16.04 uses GCC 5 as its default compiler, and there are some ABI differences between the two. Maybe something similar is happening with zlib?
Solved: zlib was expecting the uncompressed buffer size variable to be a type with the same size as a pointer, which was messing things up on x64 (I had been using a uint32_t), but I'm not sure why it worked with 16.04...
I'm not sure if it's worth adding unit tests for the implementation detail, but the API functions should be tested as fully as possible. This will involve having some BSAs to test against: my
testing-plugins
repository contains a Skyrim BSA that can be used to start with.I've implemented a barebones set of tests in the
add-tests
branch. They're currently failing on Linux due to a zlib buffer error (I'm not sure why), but to improve test coverage I need:I need to then add tests for: