Patch "selftests: use printf instead of echo -ne" has been added to the 6.2-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: use printf instead of echo -ne

to the 6.2-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-use-printf-instead-of-echo-ne.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 029bd98c88bbd59479ea1ff1c6f4fc2a72d561af
Author: Guillaume Tucker <guillaume.tucker@xxxxxxxxxxxxx>
Date:   Thu Feb 9 09:55:36 2023 +0100

    selftests: use printf instead of echo -ne
    
    [ Upstream commit 9e34fad00fc889abbb99d751a4c22cf2bded10df ]
    
    Rather than trying to guess which implementation of "echo" to run with
    support for "-ne" options, use "printf" instead of "echo -ne".  It
    handles escape characters as a standard feature and it is widespread
    among modern shells.
    
    Reported-by: "kernelci.org bot" <bot@xxxxxxxxxxxx>
    Suggested-by: David Laight <David.Laight@xxxxxxxxxx>
    Fixes: 3297a4df805d ("kselftests: Enable the echo command to print newlines in Makefile")
    Fixes: 79c16b1120fe ("selftests: find echo binary to use -ne options")
    Signed-off-by: Guillaume Tucker <guillaume.tucker@xxxxxxxxxxxxx>
    Reviewed-by: Guenter Roeck <groeck@xxxxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 9619d0f3b2ffb..06578963f4f1d 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -234,11 +234,10 @@ ifdef INSTALL_PATH
 	@# While building kselftest-list.text skip also non-existent TARGET dirs:
 	@# they could be the result of a build failure and should NOT be
 	@# included in the generated runlist.
-	ECHO=`which echo`; \
 	for TARGET in $(TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
-		[ ! -d $(INSTALL_PATH)/$$TARGET ] && $$ECHO "Skipping non-existent dir: $$TARGET" && continue; \
-		$$ECHO -ne "Emit Tests for $$TARGET\n"; \
+		[ ! -d $(INSTALL_PATH)/$$TARGET ] && printf "Skipping non-existent dir: $$TARGET\n" && continue; \
+		printf "Emit Tests for $$TARGET\n"; \
 		$(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
 			-C $$TARGET emit_tests >> $(TEST_LIST); \
 	done;



[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