public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemb@google.com>
Cc: Anders Roxell <anders.roxell@linaro.org>,
	shuah@kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets
Date: Sun, 15 Sep 2024 16:46:47 +0200	[thread overview]
Message-ID: <20240915164647.5b2e1db6@kernel.org> (raw)
In-Reply-To: <CA+FuTSc15f=+zC_p3seVShGMW164Mi+_a-XiSONzx7A83tEPqw@mail.gmail.com>

On Sun, 15 Sep 2024 09:36:10 +0200 Willem de Bruijn wrote:
> > You’re right, the patch is incorrect, I could have explained better.
> > I’m seeing an issue with an out-of-tree cross compilation build of
> > kselftest and can’t figure out what’s wrong.
> >
> > make --keep-going --jobs=32 O=/tmp/build
> > INSTALL_PATH=/tmp/build/kselftest_install \
> >      ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
> >      CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- kselftest-install
> >
> > [...]
> > make[4]: Entering directory
> > '/home/anders/src/kernel/linux/tools/testing/selftests/net/lib'
> >   CC       csum
> > /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld:
> > cannot open output file /tmp/build/kselftest/net/lib/csum: No such
> > file or directory
> > collect2: error: ld returned 1 exit status
> > [...]
> >
> > Any thoughts on what might be causing this?  
> 
> I wonder if this is due to the O= argument.
> 
> Last week I noticed that some TARGETs explicitly have support for
> this, like x86. Added in 2016 in commit a8ba798bc8ec6 ("selftests:
> enable O and KBUILD_OUTPUT"). But by now this support is hardly
> universal. amd-pstate does not have this infra, for instance.
> 
> Though if the only breakage is in net/lib, then that does not explain it fully.

Some funny business with this install target, I haven't investigated
fully but the dependency on all doesn't seem to do its job, and the
install target has a copy/paste of all with this line missing:

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 3b7df5477317..3aee8e7b9993 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -261,6 +261,7 @@ ifdef INSTALL_PATH
 	@ret=1;	\
 	for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
+		mkdir -p $$BUILD_TARGET;	\
 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET install \
 				INSTALL_PATH=$(INSTALL_PATH)/$$TARGET \
 				SRC_PATH=$(shell readlink -e $$(pwd)) \


Andres, please feel free to test / write commit message and submit this
one liner, but even with that the build for some targets fails for me.
"make [..] install" seems wobbly.

  reply	other threads:[~2024-09-15 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  6:31 [PATCH] selftests: Makefile: add missing 'net/lib' to targets Anders Roxell
2024-09-12 13:13 ` Willem de Bruijn
2024-09-12 15:23 ` Jakub Kicinski
2024-09-12 16:44   ` Shuah Khan
2024-09-15  6:44   ` Anders Roxell
2024-09-15  7:36     ` Willem de Bruijn
2024-09-15 14:46       ` Jakub Kicinski [this message]
2024-09-16  7:53         ` Anders Roxell

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=20240915164647.5b2e1db6@kernel.org \
    --to=kuba@kernel.org \
    --cc=anders.roxell@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=willemb@google.com \
    /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