linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kselftests: Enable the echo command to print newlines in Makefile
@ 2022-06-25 13:54 Gautam
  2022-06-27 17:03 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Gautam @ 2022-06-25 13:54 UTC (permalink / raw)
  To: shuah, brauner, keescook
  Cc: Gautam, kafai, songliubraving, linux-kselftest, linux-kernel,
	netdev, bpf, linux-security-module

In the install section of the main Makefile of kselftests, the echo
command is used with -n flag, which disables the printing of new line
due to which the output contains "\n" chars as follows:

  Emit Tests for alsa\nSkipping non-existent dir: arm64
  Emit Tests for breakpoints\nEmit Tests for capabilities\n

This patch fixes the above bug by using the -e flag.

Signed-off-by: Gautam <gautammenghani201@gmail.com>
---
 tools/testing/selftests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index de11992dc577..52e31437f1a3 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -253,7 +253,7 @@ ifdef INSTALL_PATH
 	for TARGET in $(TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		[ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
-		echo -n "Emit Tests for $$TARGET\n"; \
+		echo -ne "Emit Tests for $$TARGET\n"; \
 		$(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
 			-C $$TARGET emit_tests >> $(TEST_LIST); \
 	done;
-- 
2.36.1


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

* Re: [PATCH] kselftests: Enable the echo command to print newlines in Makefile
  2022-06-25 13:54 [PATCH] kselftests: Enable the echo command to print newlines in Makefile Gautam
@ 2022-06-27 17:03 ` Shuah Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2022-06-27 17:03 UTC (permalink / raw)
  To: Gautam, shuah, brauner, keescook
  Cc: kafai, songliubraving, linux-kselftest, linux-kernel, netdev, bpf,
	linux-security-module, Shuah Khan

On 6/25/22 7:54 AM, Gautam wrote:
> In the install section of the main Makefile of kselftests, the echo
> command is used with -n flag, which disables the printing of new line
> due to which the output contains "\n" chars as follows:
> 
>    Emit Tests for alsa\nSkipping non-existent dir: arm64
>    Emit Tests for breakpoints\nEmit Tests for capabilities\n
> 
> This patch fixes the above bug by using the -e flag.
> 
> Signed-off-by: Gautam <gautammenghani201@gmail.com>
> ---
>   tools/testing/selftests/Makefile | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
> index de11992dc577..52e31437f1a3 100644
> --- a/tools/testing/selftests/Makefile
> +++ b/tools/testing/selftests/Makefile
> @@ -253,7 +253,7 @@ ifdef INSTALL_PATH
>   	for TARGET in $(TARGETS); do \
>   		BUILD_TARGET=$$BUILD/$$TARGET;	\
>   		[ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \
> -		echo -n "Emit Tests for $$TARGET\n"; \
> +		echo -ne "Emit Tests for $$TARGET\n"; \
>   		$(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
>   			-C $$TARGET emit_tests >> $(TEST_LIST); \
>   	done;
> 

Thank you. Will be applied to kselftest next for Linux 5.20-rc1

thanks,
-- Shuah

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

end of thread, other threads:[~2022-06-27 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-25 13:54 [PATCH] kselftests: Enable the echo command to print newlines in Makefile Gautam
2022-06-27 17:03 ` Shuah Khan

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