mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] selftests: lib.mk: Don't fail install if no modules were built
@ 2026-10-14 13:03 Mark Brown
  2026-10-14 15:48 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-10-14 13:03 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kselftest, linux-kernel, Mark Brown

The install rule for TEST_GEN_MODS_DIR copies *.ko from the directory
with rsync which fails if there are no modules, for example because the
directory's Makefile skipped building them. Only run rsync if there is
something to install. This currently affects the livepatch suite but it
seems sensible to fix here for added robstness.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index f02cc8a2e4ae..7841bd4239c7 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -155,7 +155,7 @@ endef
 
 define INSTALL_MODS_RULE
 	$(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH)/$(INSTALL_LIST))
-	$(if $(INSTALL_LIST),rsync -a --copy-unsafe-links $(INSTALL_LIST)/*.ko $(INSTALL_PATH)/$(INSTALL_LIST))
+	$(if $(wildcard $(INSTALL_LIST)/*.ko),rsync -a --copy-unsafe-links $(INSTALL_LIST)/*.ko $(INSTALL_PATH)/$(INSTALL_LIST))
 endef
 
 define INSTALL_RULE

---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm master
change-id: 20261013-kselftest-lib-no-modules-b8d75c7c59c3

Best regards,
--  
Mark Brown <broonie@kernel.org>


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

* Re: [PATCH] selftests: lib.mk: Don't fail install if no modules were built
  2026-10-14 13:03 [PATCH] selftests: lib.mk: Don't fail install if no modules were built Mark Brown
@ 2026-10-14 15:48 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2026-10-14 15:48 UTC (permalink / raw)
  To: Mark Brown, Shuah Khan; +Cc: linux-kselftest, linux-kernel, Shuah Khan

On 10/14/26 07:03, Mark Brown wrote:
> The install rule for TEST_GEN_MODS_DIR copies *.ko from the directory
> with rsync which fails if there are no modules, for example because the
> directory's Makefile skipped building them. Only run rsync if there is
> something to install. This currently affects the livepatch suite but it
> seems sensible to fix here for added robstness.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---

Thanks. I picked this up for 7.4-rc1

thanks,
-- Shuah

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

end of thread, other threads:[~2026-10-14 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 13:03 [PATCH] selftests: lib.mk: Don't fail install if no modules were built Mark Brown
2026-10-14 15:48 ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®