public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Cc: kernel@collabora.com, kvm@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: kvm: fix mkdir error when building for non-supported arch
Date: Tue, 6 Aug 2024 10:00:33 -0600	[thread overview]
Message-ID: <6a3b2f3c-b733-4f64-a550-2f7dcbaf7cb7@linuxfoundation.org> (raw)
In-Reply-To: <20240806121029.1199794-1-usama.anjum@collabora.com>

On 8/6/24 06:10, Muhammad Usama Anjum wrote:
> The mkdir generates an error when kvm suite is build for non-supported

built
unsupported

> architecture such as arm. Fix it by ignoring the error from mkdir.
> 
> mkdir: missing operand
> Try 'mkdir --help' for more information.

Simply suppressing the message isn't a good fix. Can you investigate
a bit more on why mkdir is failing and the architectures it is failing
on?

This change simply suppresses the error message and continues - Should
this error end the build process or not run mkdir to begin with by
checking why $(sort $(dir $(TEST_GEN_PROGS)))) results in an empty
string?

> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>   tools/testing/selftests/kvm/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index 48d32c5aa3eb7..8ff46a0a8d1cd 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -317,7 +317,7 @@ $(LIBKVM_S_OBJ): $(OUTPUT)/%.o: %.S $(GEN_HDRS)
>   $(LIBKVM_STRING_OBJ): $(OUTPUT)/%.o: %.c
>   	$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -ffreestanding $< -o $@
>   
> -$(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS))))
> +$(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS))) > /dev/null 2>&1)
>   $(SPLIT_TEST_GEN_OBJ): $(GEN_HDRS)
>   $(TEST_GEN_PROGS): $(LIBKVM_OBJS)
>   $(TEST_GEN_PROGS_EXTENDED): $(LIBKVM_OBJS)


thanks,
-- Shuah

  reply	other threads:[~2024-08-06 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 12:10 [PATCH] selftests: kvm: fix mkdir error when building for non-supported arch Muhammad Usama Anjum
2024-08-06 16:00 ` Shuah Khan [this message]
2024-08-07  6:08   ` Muhammad Usama Anjum
2024-08-07  6:33     ` Muhammad Usama Anjum
2024-08-08 12:13       ` Muhammad Usama Anjum

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=6a3b2f3c-b733-4f64-a550-2f7dcbaf7cb7@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=kernel@collabora.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    --cc=usama.anjum@collabora.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