Subject: FAIL: t0501-duplicate on Alpine Linux s390x

From: Natanael Copa <[email-masked]>
Date: Thu, 21 Jun 2018 10:17:29 +0200

Hi!

It seems that the tests/duplicate segfaults on Alpine Linux s390x when
called as:

  ./duplicate bsd

+ duplicate bsd
./t0501-duplicate.sh: line 21:  3803 Segmentation fault      duplicate

I have attached the test-suite.log.

Backtrace:

Core was generated by `/home/ncopa/aports/main/parted/src/parted-3.2/tests/.libs/lt-duplicate bsd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000003ff8ad23f32 in xbsd_dkcksum (lp=0x3ff8ac54c80) at bsd.c:134
134                     sum ^= *start++;
(gdb) bt
#0  0x000003ff8ad23f32 in xbsd_dkcksum (lp=0x3ff8ac54c80) at bsd.c:134
#1  bsd_write (disk=0x3ff8ac54ac0) at bsd.c:368
#2  0x000003ff8ad12afe in ped_disk_commit_to_dev (disk=0x3ff8ac54ac0) at disk.c:500
#3  0x000003ff8ad12b66 in ped_disk_commit (disk=0x3ff8ac54ac0) at disk.c:529
#4  0x000002aa275814a4 in main (argc=<optimized out>, argv=<optimized out>) at duplicate.c:39

A wild guess is that xbsd_dkcksum does not work properly on big endian
machines.