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 <[email protected]> --- 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 <[email protected]>

