Skip to content

Commit 4e89a78

Browse files
Timur Tabipmladek
authored andcommitted
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 <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Acked-by: Marco Elver <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 61bb17d commit 4e89a78

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/test_bitmap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
#include "../tools/testing/selftests/kselftest_module.h"
1818

19-
static unsigned total_tests __initdata;
20-
static unsigned failed_tests __initdata;
19+
KSTM_MODULE_GLOBALS();
2120

2221
static char pbl_buffer[PAGE_SIZE] __initdata;
2322

lib/test_printf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#define PAD_SIZE 16
3131
#define FILL_CHAR '$'
3232

33-
static unsigned total_tests __initdata;
34-
static unsigned failed_tests __initdata;
33+
KSTM_MODULE_GLOBALS();
34+
3535
static char *test_buffer __initdata;
3636
static char *alloced_buffer __initdata;
3737

0 commit comments

Comments
 (0)