Skip to content

multipath-tools: CI fixes for glibc symbol substitutions

Martin Wilck dm-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37tests/directio.c tests/vpd.c tests/wrap64.h+56 -321 reply
2/2multipath-tools tests: fix CI failures with clang on Fedora Rawhidetests/dmevents.c tests/sysfs.c tests/test-lib.c +1 more+49 -350 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBenjamin Marzinski
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] multipath-tools: CI fixes for glibc symbol substitutions

Or cmocka-based CI relies on the ability to wrap functions calls, both our own code and from and system libraries, with the --Wl,--wrap linker flags. This works only if the function name in the function call generated by the compliler is known. glibc has introduced function substitutions for multiple system calls that break this assumption and thus break our CI. For example, a C call to open() may be translated into a "call __open64_2" assembly instruction.

We have first seen this with 7b217f8 ("multipath-tools: Makefile.inc:
set _FILE_OFFSET_BITS=64"), but also happens independently of the type size macros. The 2nd patch in this series works around a compiler-dependent substitution.

This has an unfortunate effect on our CI code, which is becoming increasingly hard to understand, with lots of #if's with workarounds combinations of library versions, compilers, and compile time settings.

CI failures have lately been caused much more frequently by this sort of failure than by actual bugs in our own code, which is causing significant maintenance effort.

I am not sure how to deal with this in the long term. I don't see a general solution, although it's unlikely that only multipath-tools is affected by this problem. For now, here are patches that fix the recent CI regressions.

Changes wrt v1:

- 1/2: fix compilation with DIO_TEST_DEV set (Ben Marzinski)
Note: this fixes the compilation, but the directio test itself fails under qemu-linux-static. See commit message for 1/2.

Martin Wilck (2):
multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37 multipath-tools tests: fix CI failures with clang on Fedora Rawhide

 tests/directio.c | 28 +++++++++++------------
 tests/dmevents.c |  6 ++---
 tests/sysfs.c    | 58 ++++++++++++++++++++++++------------------------
 tests/test-lib.c |  6 ++---
 tests/vpd.c      | 35 +++++++++++++++--------------
 tests/wrap64.h   | 39 +++++++++++++++++++++++++++++++-
 6 files changed, 105 insertions(+), 67 deletions(-)
Signature · 1 line
2.44.0