summaryrefslogtreecommitdiff
path: root/tests/test.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-09-12 23:52:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-09-13 00:03:39 +0200
commite5540b5a3a545ed4e3f3df97be131ec81a155032 (patch)
treeee8725f594ae602dd8043abf2f960e387d5a12d0 /tests/test.h
parent3ef7c3bb37e40de2653daf306e8bcb2a87446271 (diff)
Fix struct offset testing in ABI test case
The intention of the (severely incomplete) ABI test case is to detect changes to the ABI of libsquashfs. Currently it tries to blurt out if the layout of some structure is changed unintentionally. Unfortunately, the test uses some unportable assumptions. Among other things, it was assumed that a 64 bit field will always require 64 bit alignment. This is apparently no the case on 32 bit x86. This patch makes the check work on 32 bit and 64 bit x86, by adding an additional runtime check that relies on the __alignof__ extension offered by gcc and clang (the only 2 compilers that are really supported at the moment). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/test.h')
0 files changed, 0 insertions, 0 deletions