From 0da2ef239476b48b0883f17af985d4cc212b22a8 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Sun, 14 Feb 2021 10:13:46 -0600 Subject: [PATCH] UPSTREAM: lib: use KSTM_MODULE_GLOBALS macro in kselftest drivers Instead of defining the total/failed test counters manually, test drivers that are clients of kselftest should use the macro created for this purpose. Signed-off-by: Timur Tabi Reviewed-by: Petr Mladek Acked-by: Marco Elver Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210214161348.369023-2-timur@kernel.org Bug: 177201466 Bug: 180086542 (cherry picked from commit 4e89a78779647ca7ee2967551c599633fe9d3647) Signed-off-by: Alexander Potapenko Change-Id: I5d60024e8214548ef1ee3a4e48b0dbc50a8adde9 --- lib/test_bitmap.c | 3 +-- lib/test_printf.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 51a98f7ee79e..1ee9d95898b5 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -16,8 +16,7 @@ #include "../tools/testing/selftests/kselftest_module.h" -static unsigned total_tests __initdata; -static unsigned failed_tests __initdata; +KSTM_MODULE_GLOBALS(); static char pbl_buffer[PAGE_SIZE] __initdata; diff --git a/lib/test_printf.c b/lib/test_printf.c index d4b711b53942..0f28f7a00684 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -28,8 +28,8 @@ #define PAD_SIZE 16 #define FILL_CHAR '$' -static unsigned total_tests __initdata; -static unsigned failed_tests __initdata; +KSTM_MODULE_GLOBALS(); + static char *test_buffer __initdata; static char *alloced_buffer __initdata;