]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: fix fdisk/bsd for the two possible sectors/offsets
authorAurelien Jarno <aurelien@aurel32.net>
Thu, 14 Aug 2014 22:26:24 +0000 (00:26 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Aug 2014 08:47:11 +0000 (10:47 +0200)
commita80886e93c1d25dbc43ce208aeeac697c813cb60
treef697aa0058611ee695bf8db6f337068dc9748f9c
parent42f15e9848dc07e86a2b80c742a0179aaced6c71
tests: fix fdisk/bsd for the two possible sectors/offsets

BSD disklabels depend on the endianess, but also on the architecture as
one can see in include/pt-bsd.h with the BSD_LABELSECTOR and
BSD_LABELOFFSET #define. This cause the testsuite to fail on the
affected architectures as the disk image is not the same as the expected
result.

Commit 180b3a7e tried to fix the endianess, but the special PowerPC case
has been chosen as a reference, so it still fails for example on MIPS BE
or S/390.

This patch fixes the testsuite by converting the md5sums to the expected
values, still depending on the endianess, but also for the two possible
sectors/offsets. This has been tested on Alpha, MIPS, PowerPC and x86-64,
so this should cover all 4 cases.

Cc: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tests/ts/fdisk/bsd