]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: use printf instead of echo -ne
authorGuillaume Tucker <guillaume.tucker@collabora.com>
Thu, 9 Feb 2023 08:55:36 +0000 (09:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:27 +0000 (09:33 +0100)
commite2f0eb853ce6bab60ca405aa01dcb4dd2fd34657
tree43f7eb8d2f4d7d9a6d8d3c4e395ce4162b2c6f8a
parente9085e1d3a3e4bf9ff0742cde764127c7ca3c2db
selftests: use printf instead of echo -ne

[ Upstream commit 43149e5c5d2bbb00d1d7a122339d1acf8bbd2cff ]

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@kernelci.org>
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Fixes: 99ae430547b1 ("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@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/Makefile