diff mbox series

[1/2] selftests: Replace "Bail out" with "Error"

Message ID 20240405131748.1582646-2-usama.anjum@collabora.com (mailing list archive)
State New
Headers show
Series selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg() | expand

Commit Message

Muhammad Usama Anjum April 5, 2024, 1:17 p.m. UTC
"Bail out! " is not descriptive. It rather should be: "Failed: " and
then that added prefix doesn't need to be added everywhere. Usually in
the logs, we are searching for "Failed" or "Error" instead of "Bail
out".

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 tools/testing/selftests/kselftest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kees Cook April 5, 2024, 3:32 p.m. UTC | #1
On Fri, Apr 05, 2024 at 06:17:47PM +0500, Muhammad Usama Anjum wrote:
> "Bail out! " is not descriptive. It rather should be: "Failed: " and
> then that added prefix doesn't need to be added everywhere. Usually in
> the logs, we are searching for "Failed" or "Error" instead of "Bail
> out".
> 
> Suggested-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>

Reviewed-by: Kees Cook <keescook@chromium.org>
diff mbox series

Patch

diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h
index 2cd93d220f434..9d1d8c5a73ab2 100644
--- a/tools/testing/selftests/kselftest.h
+++ b/tools/testing/selftests/kselftest.h
@@ -362,7 +362,7 @@  static inline __printf(1, 2) int ksft_exit_fail_msg(const char *msg, ...)
 	va_list args;
 
 	va_start(args, msg);
-	printf("Bail out! ");
+	printf("Error: ");
 	errno = saved_errno;
 	vprintf(msg, args);
 	va_end(args);