linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joel Savitz <jsavitz@redhat.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	 Sandipan Das <sandipan@linux.ibm.com>,
	Dave Hansen <dave.hansen@intel.com>,
	 Nico Pache <npache@redhat.com>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] selftests: vm: Makefile: rename TARGETS to VMTARGETS
Date: Wed, 4 May 2022 17:42:00 -0400	[thread overview]
Message-ID: <CAL1p7m70B7Jx4CO1Fp8ktpyHqjqZ7Jsq=1SwmnQpDX0akhANxQ@mail.gmail.com> (raw)
In-Reply-To: <20220504213454.1282532-1-jsavitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3185 bytes --]

On Wed, May 4, 2022 at 5:35 PM Joel Savitz <jsavitz@redhat.com> wrote:

> The tools/testing/selftests/vm/Makefile uses the variable TARGETS
> internally to generate a list of platform-specific binary build targets
> suffixed with _{32,64}. When building the selftests using its own
> Makefile directly, such as via the following command run in a kernel
> tree:
>
> Oops, forgot to put the actual command in here, sending follow up.


> One receives an error such as the following:
>
> make: Entering directory '/root/linux/tools/testing/selftests'
> make --no-builtin-rules ARCH=x86 -C ../../.. headers_install
> make[1]: Entering directory '/root/linux'
>   INSTALL ./usr/include
> make[1]: Leaving directory '/root/linux'
> make[1]: Entering directory '/root/linux/tools/testing/selftests/vm'
> make[1]: *** No rule to make target 'vm.c', needed by
> '/root/linux/tools/testing/selftests/vm/vm_64'.  Stop.
> make[1]: Leaving directory '/root/linux/tools/testing/selftests/vm'
> make: *** [Makefile:175: all] Error 2
> make: Leaving directory '/root/linux/tools/testing/selftests'
>
> The TARGETS variable passed to tools/testing/selftests/Makefile collides
> with the TARGETS used in tools/testing/selftests/vm/Makefile, so rename
> the latter to VMTARGETS, eliminating the collision with no functional
> change.
>
> Fixes: f21fda8f6453 ("selftests: vm: pkeys: fix multilib builds for
> x86")
>
> Signed-off-by: Joel Savitz <jsavitz@redhat.com>
> ---
>  tools/testing/selftests/vm/Makefile | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/vm/Makefile
> b/tools/testing/selftests/vm/Makefile
> index 04a49e876a46..5b1ecd00695b 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -57,9 +57,9 @@ CAN_BUILD_I386 := $(shell ./../x86/check_cc.sh "$(CC)"
> ../x86/trivial_32bit_prog
>  CAN_BUILD_X86_64 := $(shell ./../x86/check_cc.sh "$(CC)"
> ../x86/trivial_64bit_program.c)
>  CAN_BUILD_WITH_NOPIE := $(shell ./../x86/check_cc.sh "$(CC)"
> ../x86/trivial_program.c -no-pie)
>
> -TARGETS := protection_keys
> -BINARIES_32 := $(TARGETS:%=%_32)
> -BINARIES_64 := $(TARGETS:%=%_64)
> +VMTARGETS := protection_keys
> +BINARIES_32 := $(VMTARGETS:%=%_32)
> +BINARIES_64 := $(VMTARGETS:%=%_64)
>
>  ifeq ($(CAN_BUILD_WITH_NOPIE),1)
>  CFLAGS += -no-pie
> @@ -112,7 +112,7 @@ $(BINARIES_32): CFLAGS += -m32 -mxsave
>  $(BINARIES_32): LDLIBS += -lrt -ldl -lm
>  $(BINARIES_32): $(OUTPUT)/%_32: %.c
>         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
> -$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-32,$(t))))
> +$(foreach t,$(VMTARGETS),$(eval $(call gen-target-rule-32,$(t))))
>  endif
>
>  ifeq ($(CAN_BUILD_X86_64),1)
> @@ -120,7 +120,7 @@ $(BINARIES_64): CFLAGS += -m64 -mxsave
>  $(BINARIES_64): LDLIBS += -lrt -ldl
>  $(BINARIES_64): $(OUTPUT)/%_64: %.c
>         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(notdir $^) $(LDLIBS) -o $@
> -$(foreach t,$(TARGETS),$(eval $(call gen-target-rule-64,$(t))))
> +$(foreach t,$(VMTARGETS),$(eval $(call gen-target-rule-64,$(t))))
>  endif
>
>  # x86_64 users should be encouraged to install 32-bit libraries
> --
> 2.27.0
>
>

[-- Attachment #2: Type: text/html, Size: 4121 bytes --]

      parent reply	other threads:[~2022-05-04 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 21:34 Joel Savitz
2022-05-04 21:40 ` Joel Savitz
2022-05-05  0:25   ` Nico Pache
2022-05-04 21:42 ` Joel Savitz [this message]

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='CAL1p7m70B7Jx4CO1Fp8ktpyHqjqZ7Jsq=1SwmnQpDX0akhANxQ@mail.gmail.com' \
    --to=jsavitz@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npache@redhat.com \
    --cc=sandipan@linux.ibm.com \
    --cc=shuah@kernel.org \
    /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