DM-Devel Archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Benjamin Marzinski <bmarzins@redhat.com>
Cc: dm-devel@lists.linux.dev
Subject: [PATCH v2 0/2] multipath-tools: CI fixes for glibc symbol substitutions
Date: Tue, 16 Apr 2024 20:53:49 +0200	[thread overview]
Message-ID: <20240416185351.30670-1-mwilck@suse.com> (raw)

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(-)

-- 
2.44.0


             reply	other threads:[~2024-04-16 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 18:53 Martin Wilck [this message]
2024-04-16 18:53 ` [PATCH v2 1/2] multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37 Martin Wilck
2024-04-16 19:46   ` Benjamin Marzinski
2024-04-16 18:53 ` [PATCH v2 2/2] multipath-tools tests: fix CI failures with clang on Fedora Rawhide Martin Wilck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240416185351.30670-1-mwilck@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).