Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Eugene Syromiatnikov <esyr@redhat.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-kselftest@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Mykola Lysenko <mykolal@fb.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, Artem Savkov <asavkov@redhat.com>
Subject: Re: [PATCH v2] selftests: fix relative rpath usage
Date: Tue, 13 Aug 2024 18:33:48 +0200	[thread overview]
Message-ID: <20240813163348.GA30739@asgard.redhat.com> (raw)
In-Reply-To: <3667e585-ecaa-4664-9e6e-75dc9de928e8@linuxfoundation.org>

On Mon, Aug 12, 2024 at 05:03:45PM -0600, Shuah Khan wrote:
> On 8/12/24 10:56, Eugene Syromiatnikov wrote:
> >The relative RPATH ("./") supplied to linker options in CFLAGS is resolved
> >relative to current working directory and not the executable directory,
> >which will lead in incorrect resolution when the test executables are run
> >from elsewhere.  Changing it to $ORIGIN makes it resolve relative
> >to the directory in which the executables reside, which is supposedly
> >the desired behaviour.  This patch also moves these CFLAGS to lib.mk,
> >so the RPATH is provided for all selftest binaries, which is arguably
> >a useful default.
> 
> Can you elaborate on the erros you would see if this isn't fixed? I understand
> that check-rpaths tool - howebver I would like to know how it manifests and

One would be unable to execute the test binaries that require additional
locally built dynamic libraries outside the directories in which they reside:

    [build@builder selftests]$ alsa/mixer-test
    alsa/mixer-test: error while loading shared libraries: libatest.so: cannot open shared object file: No such file or directory

> how would you reproduce this problem while running selftests?

This usually doesn't come up in a regular selftests usage so far, as they
are usually run via make, and make descends into specific test directories
to execute make the respective make targets there, triggering the execution
of the specific test bineries.


  reply	other threads:[~2024-08-13 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 16:56 [PATCH v2] selftests: fix relative rpath usage Eugene Syromiatnikov
2024-08-12 23:03 ` Shuah Khan
2024-08-13 16:33   ` Eugene Syromiatnikov [this message]
2024-08-14 11:14     ` Shuah Khan
2024-08-14 12:25       ` Eugene Syromiatnikov
2024-08-19  9:33         ` Shuah Khan
2024-08-23  4:04 ` kernel test robot
2024-08-25  9:40 ` kernel test robot

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=20240813163348.GA30739@asgard.redhat.com \
    --to=esyr@redhat.com \
    --cc=andrii@kernel.org \
    --cc=asavkov@redhat.com \
    --cc=ast@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=broonie@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mykolal@fb.com \
    --cc=paulmck@kernel.org \
    --cc=perex@perex.cz \
    --cc=peterz@infradead.org \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=song@kernel.org \
    --cc=tiwai@suse.com \
    --cc=yonghong.song@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