kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Xiaoyao Li <xiaoyao.li@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Cc: shuah <shuah@kernel.org>
Subject: Re: [PATCH 1/2] kvm: selftests: Fix no directory error when OUTPUT specified
Date: Mon, 23 Mar 2020 09:40:26 -0600	[thread overview]
Message-ID: <99584925-69e7-7dab-7dd9-ee920ac343a0@kernel.org> (raw)
In-Reply-To: <20200315093425.33600-2-xiaoyao.li@intel.com>

On 3/15/20 3:34 AM, Xiaoyao Li wrote:
> When build kvm selftests to an specified directory with
> 
> 	make OUTPUT=~/kvm-selftests
> 
> it encouters following error:

btw lib.mk can't handle relative paths yet. The problems
you are seeing are related to that as well. This relative
path issue should be fixed in lib.mk and not in individual
tests.

> 
> /usr/bin/ld: cannot open output file
> /home/lxy/kvm-selftests/x86_64/cr4_cpuid_sync_test: No such file or
> directory
> collect2: error: ld returned 1 exit status
> make: *** [../lib.mk:141:
> /home/lxy/kvm-selftests/x86_64/cr4_cpuid_sync_test] Error 1
> 
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
>   tools/testing/selftests/kvm/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile
> index d91c53b726e6..86797e0242d4 100644
> --- a/tools/testing/selftests/kvm/Makefile
> +++ b/tools/testing/selftests/kvm/Makefile
> @@ -66,6 +66,7 @@ LDFLAGS += -pthread $(no-pie-option) $(pgste-option)
>   # After inclusion, $(OUTPUT) is defined and
>   # $(TEST_GEN_PROGS) starts with $(OUTPUT)/
>   include ../lib.mk
> +x := $(shell mkdir -p $(sort $(dir $(TEST_GEN_PROGS))))

lib.mk would have created the directory.

thanks,
-- Shuah


  reply	other threads:[~2020-03-23 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15  9:34 [PATCH 0/2] Fix errors when try to build kvm selftests on Xiaoyao Li
2020-03-15  9:34 ` [PATCH 1/2] kvm: selftests: Fix no directory error when OUTPUT specified Xiaoyao Li
2020-03-23 15:40   ` shuah [this message]
2020-03-24  1:51     ` Xiaoyao Li
2020-03-15  9:34 ` [PATCH 2/2] selftests: export INSTALL_HDR_PATH if using "O" to specify output dir Xiaoyao Li
2020-03-18 13:13 ` [PATCH 0/2] Fix errors when try to build kvm selftests on Paolo Bonzini
2020-03-23 15:33   ` shuah
2020-03-23 15:44   ` shuah
2020-03-23 19:42     ` Paolo Bonzini

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=99584925-69e7-7dab-7dd9-ee920ac343a0@kernel.org \
    --to=shuah@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=xiaoyao.li@intel.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;
as well as URLs for NNTP newsgroup(s).