Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Disable spidev on big-endian 32-bit platforms #262

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

hdeller
Copy link
Contributor

@hdeller hdeller commented Dec 29, 2024

The class IoctlSpiBase (see src/umockdev-spi.vala) has a comment that it only works on 64bit platforms.
Disable those tests on 32-bit platforms for now.

This fixes my tests on the (32-bit) hppa platform.

This patch is just to show the problem (and a possible workaround).
If you find another way to fix (or skip) this test I'm fine with that,

Thanks!
Helge

@martinpitt
Copy link
Owner

Curious, CI runs on Debian i386 and alpine i386, and passes there. But indeed src/umockdev-spi.vala mentions "This only works on 64bit machines", perhaps @benzea still remembers why. Could we make them more specific to hppa? https://en.wikipedia.org/wiki/PA-RISC says hppa is 64 bit big-endian, which would explain the ulong incompatibility. On the other hand, tests also run on s390x which is 64 bit big-endian too. So something doesn't add up here. Are you sure that your specific version of (or Debian's definition of) hppa is 32 bit?

@hdeller
Copy link
Contributor Author

hdeller commented Dec 30, 2024

Debian/hppa is currently 32-bit big-endian only (the Linux kernel may be either 32- or 64-bit though - similiar to 32bit userspace on 64bit amd64 machine).
Compared to s390x, "unsigned" is then a 32-bit value, while on s390x it's a 64-bit value.
Maybe that's the difference?
Should be possible to test again on both platforms on the debian porterboxes.

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]>
@martinpitt martinpitt changed the title disable spidev tests on 32-bit platforms tests: Disable spidev on big-endian 32-bit platforms Jan 1, 2025
@martinpitt
Copy link
Owner

Thanks! I adjusted the test to skip on 32 bit BE only, and also be more verbose about that fact (similar to how other tests are skipped).

Copy link
Owner

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on the Debian hppa porter box. meson test passes now (despite #263 not yet being addressed)

@martinpitt martinpitt merged commit f2f15a5 into martinpitt:main Jan 1, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants