Message ID | cover.1683661648.git.simon@simonsouth.net |
---|---|
Headers | show |
Series | gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms. | expand |
On Tue, May 09, 2023 at 04:43:27PM -0400, Simon South wrote: > This patch fixes the build of vulkan-loader on aarch64-linux by > causing five tests that require an x86 or x86-64 host to be skipped. I have to admit that I didn't check the bug tracker before I pushed my change (which mirrored Chris's earlier patch) to just skip the tests entirely on a bunch of architectures. > I've tested this change on x86-64 (to confirm the patch has no real > effect) and AArch64 and everything seems fine. > > The tests that are skipped use pre-built, dummy libraries supplied in > the source package to check the loader's ability to detect a request > for a 32-bit library on a 64-bit system, and vice-versa. This is done > by checking for a specific error message generated by a call to > dlopen(). The dummy libraries provided are built only for x86 and > x86-64, though, so on other platforms dlopen() produces a different > error ("No such file" instead of "wrong ELF class") and the tests > fail. Another option would be to patch the tests to look for these strings instead when we're building on those architectures. > The source package supplies a makefile that could be used to > regenerate these dummy libraries, but as written the makefile assumes > that > > - gcc recognizes "-m32" and "-m64" options to select a target > subarchitecture, which is true on x86 and PowerPC but not on > AArch64 or RISC-V, for instance; and that > > - The system's linker is able to output libraries for multiple > architectures, requiring (among other things) that multiple > versions of glibc be available, and even using "cross-gcc" and > "cross-libc" I haven't found a straightforward way to achieve this > within a single package build. This also seems to be above-and-beyond for 5 tests out of ~400. > So I expect modifying things to make these tests work on other > platforms would be more trouble than it's worth. Having looked at these myself I agree that it's non-trivial to skip the failing tests on the other architectures. Debian, for instance, runs the tests, but if they fail ignores the outcome, and prints to the build log that 23 tests are expected to fail. > --- > > Simon South (1): > gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms. > > gnu/local.mk | 1 + > ...ulkan-loader-skip-incompatible-tests.patch | 62 +++++++++++++++++++ > gnu/packages/vulkan.scm | 2 + > 3 files changed, 65 insertions(+) > create mode 100644 gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch > > > base-commit: c1ffe2f21bd1b9ba6bd527bbabe130144a69af71 > -- > 2.39.2 > > > >