Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Anders Roxell <anders.roxell@linaro.org>, shuah@kernel.org
Cc: willemb@google.com, kuba@kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: Makefile: create OUTPUT dir
Date: Thu, 19 Sep 2024 09:51:47 -0600	[thread overview]
Message-ID: <952aeec9-c21f-46ce-bf68-e6ffce51630c@linuxfoundation.org> (raw)
In-Reply-To: <20240916075655.4117151-1-anders.roxell@linaro.org>

On 9/16/24 01:56, Anders Roxell wrote:
> When cross building kselftest out-of-tree the following issue can be
> seen:
> 
> [...]
> make[4]: Entering directory
> '/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
> [...]
> 
> Create the output build directory before building the targets, solves
> this issue with building 'net/lib/csum'.
> 
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>   tools/testing/selftests/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index b38199965f99..05c143bcff6a 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)) \


Doesn't the "all" target mkdir work for this case? Why do we need another mkdir here?

thanks,
-- Shuah




  reply	other threads:[~2024-09-19 15:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16  7:56 [PATCH] selftests: Makefile: create OUTPUT dir Anders Roxell
2024-09-19 15:51 ` Shuah Khan [this message]
2024-09-20 10:38   ` Jakub Kicinski
2024-09-25 17:26     ` Shuah Khan
2024-10-02  6:15       ` Anders Roxell
2024-10-04  0:01         ` Shuah Khan

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=952aeec9-c21f-46ce-bf68-e6ffce51630c@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=kuba@kernel.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