Skip to content

Commit

Permalink
tests: Disable spidev on big-endian 32-bit platforms
Browse files Browse the repository at this point in the history
The class IoctlSpiBase (see src/umockdev-spi.vala) has a comment
that it only works on 64bit platforms.
Disable those tests on 32-bit big-endian platforms for now, such as
Debian hppa.

Co-Authored-By: Martin Pitt <[email protected]>
  • Loading branch information
hdeller and martinpitt committed Jan 1, 2025
1 parent 42b2af1 commit a3e7170
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-umockdev-vala.vala
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,12 @@ t_usbfs_ioctl_pcap ()
void
t_spidev_ioctl ()
{
// does not work on 32 bit big-endian (such as Debian hppa)
if (sizeof(long) != sizeof(int64) && BYTE_ORDER == ByteOrder.BIG_ENDIAN) {
stdout.printf ("[SKIP: SPI emulation does not work on 32 bit big-endian] ");
return;
}

var tb = new UMockdev.Testbed ();

string device;
Expand Down

0 comments on commit a3e7170

Please sign in to comment.