Patch "selftests: Keep symlinks, when possible" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: Keep symlinks, when possible

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-keep-symlinks-when-possible.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b1170efcf9dbea8d445a73c7883696056ef03cf2
Author: Björn Töpel <bjorn@xxxxxxxxxxxx>
Date:   Tue Aug 22 15:58:37 2023 +0200

    selftests: Keep symlinks, when possible
    
    [ Upstream commit 3f3f384139ed147c71e1d770accf610133d5309b ]
    
    When kselftest is built/installed with the 'gen_tar' target, rsync is
    used for the installation step to copy files. Extra care is needed for
    tests that have symlinks. Commit ae108c48b5d2 ("selftests: net: Fix
    cross-tree inclusion of scripts") added '-L' (transform symlink into
    referent file/dir) to rsync, to fix dangling links. However, that
    broke some tests where the symlink (being a symlink) is part of the
    test (e.g. exec:execveat).
    
    Use rsync's '--copy-unsafe-links' that does right thing.
    
    Fixes: ae108c48b5d2 ("selftests: net: Fix cross-tree inclusion of scripts")
    Signed-off-by: Björn Töpel <bjorn@xxxxxxxxxxxx>
    Reviewed-by: Benjamin Poirier <bpoirier@xxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index d17854285f2b6..118e0964bda94 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -106,7 +106,7 @@ endef
 run_tests: all
 ifdef building_out_of_srctree
 	@if [ "X$(TEST_PROGS)$(TEST_PROGS_EXTENDED)$(TEST_FILES)" != "X" ]; then \
-		rsync -aLq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
+		rsync -aq --copy-unsafe-links $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT); \
 	fi
 	@if [ "X$(TEST_PROGS)" != "X" ]; then \
 		$(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) \
@@ -120,7 +120,7 @@ endif
 
 define INSTALL_SINGLE_RULE
 	$(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH))
-	$(if $(INSTALL_LIST),rsync -aL $(INSTALL_LIST) $(INSTALL_PATH)/)
+	$(if $(INSTALL_LIST),rsync -a --copy-unsafe-links $(INSTALL_LIST) $(INSTALL_PATH)/)
 endef
 
 define INSTALL_RULE



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux