linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] selftests/kexec: fix test_kexec_jump build
@ 2025-07-02 17:17 Moon Hee Lee
  2025-07-02 17:37 ` Moonhee Lee
  2025-07-03  6:44 ` Baoquan He
  0 siblings, 2 replies; 4+ messages in thread
From: Moon Hee Lee @ 2025-07-02 17:17 UTC (permalink / raw)
  To: khan
  Cc: kexec, dwmw, mingo, linux-kselftest, linux-kernel,
	linux-kernel-mentees, shuah, Moon Hee Lee, Shuah Khan

The test_kexec_jump program builds correctly when invoked from the top-level
selftests/Makefile, which explicitly sets the OUTPUT variable. However,
building directly in tools/testing/selftests/kexec fails with:

  make: *** No rule to make target '/test_kexec_jump', needed by 'test_kexec_jump.sh'.  Stop.

This failure occurs because the Makefile rule relies on $(OUTPUT), which is
undefined in direct builds.

Fix this by listing test_kexec_jump in TEST_GEN_PROGS, the standard way to
declare generated test binaries in the kselftest framework. This ensures the
binary is built regardless of invocation context and properly removed by
make clean.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
---
Changes in v2:
- Dropped the .gitignore addition, as it is already handled in [1]

[1] https://lore.kernel.org/r/20250623232549.3263273-1-dyudaken@gmail.com


 tools/testing/selftests/kexec/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kexec/Makefile b/tools/testing/selftests/kexec/Makefile
index e3000ccb9a5d..874cfdd3b75b 100644
--- a/tools/testing/selftests/kexec/Makefile
+++ b/tools/testing/selftests/kexec/Makefile
@@ -12,7 +12,7 @@ include ../../../scripts/Makefile.arch
 
 ifeq ($(IS_64_BIT)$(ARCH_PROCESSED),1x86)
 TEST_PROGS += test_kexec_jump.sh
-test_kexec_jump.sh: $(OUTPUT)/test_kexec_jump
+TEST_GEN_PROGS := test_kexec_jump
 endif
 
 include ../lib.mk
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests/kexec: fix test_kexec_jump build
  2025-07-02 17:17 [PATCH v2] selftests/kexec: fix test_kexec_jump build Moon Hee Lee
@ 2025-07-02 17:37 ` Moonhee Lee
  2025-07-03  6:44 ` Baoquan He
  1 sibling, 0 replies; 4+ messages in thread
From: Moonhee Lee @ 2025-07-02 17:37 UTC (permalink / raw)
  To: Shuah Khan
  Cc: kexec, dwmw, mingo, linux-kselftest, linux-kernel,
	linux-kernel-mentees, shuah

On Wed, Jul 2, 2025 at 10:17 AM Moon Hee Lee <moonhee.lee.ca@gmail.com> wrote:
> ---
> Changes in v2:
> - Dropped the .gitignore addition, as it is already handled in [1]
>
> [1] https://lore.kernel.org/r/20250623232549.3263273-1-dyudaken@gmail.com

Just noticed I had the wrong address in the To field — the correct one
(skhan@linuxfoundation.org) was already in Cc, but sending this to fix it
properly.

No changes to the patch.

Thanks,
Moonhee

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests/kexec: fix test_kexec_jump build
  2025-07-02 17:17 [PATCH v2] selftests/kexec: fix test_kexec_jump build Moon Hee Lee
  2025-07-02 17:37 ` Moonhee Lee
@ 2025-07-03  6:44 ` Baoquan He
  2025-07-08  7:18   ` Woodhouse, David
  1 sibling, 1 reply; 4+ messages in thread
From: Baoquan He @ 2025-07-03  6:44 UTC (permalink / raw)
  To: Moon Hee Lee
  Cc: khan, kexec, dwmw, mingo, linux-kselftest, linux-kernel,
	linux-kernel-mentees, shuah, Shuah Khan

On 07/02/25 at 10:17am, Moon Hee Lee wrote:
> The test_kexec_jump program builds correctly when invoked from the top-level
> selftests/Makefile, which explicitly sets the OUTPUT variable. However,
> building directly in tools/testing/selftests/kexec fails with:
> 
>   make: *** No rule to make target '/test_kexec_jump', needed by 'test_kexec_jump.sh'.  Stop.

I can reproduce this, and this patch fixes it. Thanks.

Acked-by: Baoquan He <bhe@redhat.com>

> 
> This failure occurs because the Makefile rule relies on $(OUTPUT), which is
> undefined in direct builds.
> 
> Fix this by listing test_kexec_jump in TEST_GEN_PROGS, the standard way to
> declare generated test binaries in the kselftest framework. This ensures the
> binary is built regardless of invocation context and properly removed by
> make clean.
> 
> Acked-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
> ---
> Changes in v2:
> - Dropped the .gitignore addition, as it is already handled in [1]
> 
> [1] https://lore.kernel.org/r/20250623232549.3263273-1-dyudaken@gmail.com
> 
> 
>  tools/testing/selftests/kexec/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/kexec/Makefile b/tools/testing/selftests/kexec/Makefile
> index e3000ccb9a5d..874cfdd3b75b 100644
> --- a/tools/testing/selftests/kexec/Makefile
> +++ b/tools/testing/selftests/kexec/Makefile
> @@ -12,7 +12,7 @@ include ../../../scripts/Makefile.arch
>  
>  ifeq ($(IS_64_BIT)$(ARCH_PROCESSED),1x86)
>  TEST_PROGS += test_kexec_jump.sh
> -test_kexec_jump.sh: $(OUTPUT)/test_kexec_jump
> +TEST_GEN_PROGS := test_kexec_jump
>  endif
>  
>  include ../lib.mk
> -- 
> 2.43.0
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] selftests/kexec: fix test_kexec_jump build
  2025-07-03  6:44 ` Baoquan He
@ 2025-07-08  7:18   ` Woodhouse, David
  0 siblings, 0 replies; 4+ messages in thread
From: Woodhouse, David @ 2025-07-08  7:18 UTC (permalink / raw)
  To: moonhee.lee.ca@gmail.com, bhe@redhat.com
  Cc: kexec@lists.infradead.org, mingo@kernel.org,
	linux-kselftest@vger.kernel.org, khan@linuxfoundation.org,
	linux-kernel-mentees@lists.linux.dev, shuah@kernel.org,
	linux-kernel@vger.kernel.org, skhan@linuxfoundation.org


[-- Attachment #1.1: Type: text/plain, Size: 617 bytes --]

On Thu, 2025-07-03 at 14:44 +0800, Baoquan He wrote:
> On 07/02/25 at 10:17am, Moon Hee Lee wrote:
> > The test_kexec_jump program builds correctly when invoked from the
> > top-level
> > selftests/Makefile, which explicitly sets the OUTPUT variable.
> > However,
> > building directly in tools/testing/selftests/kexec fails with:
> > 
> >   make: *** No rule to make target '/test_kexec_jump', needed by
> > 'test_kexec_jump.sh'.  Stop.
> 
> I can reproduce this, and this patch fixes it. Thanks.
> 
> Acked-by: Baoquan He <bhe@redhat.com>

Acked-by: David Woodhouse <dwmw@amazon.co.uk>

Thanks.

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5964 bytes --]

[-- Attachment #2.1: Type: text/plain, Size: 215 bytes --]




Amazon Development Centre (London) Ltd. Registered in England and Wales with registration number 04543232 with its registered office at 1 Principal Place, Worship Street, London EC2A 2FA, United Kingdom.



[-- Attachment #2.2: Type: text/html, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-08  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 17:17 [PATCH v2] selftests/kexec: fix test_kexec_jump build Moon Hee Lee
2025-07-02 17:37 ` Moonhee Lee
2025-07-03  6:44 ` Baoquan He
2025-07-08  7:18   ` Woodhouse, David

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).