History

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.

Timur Tabi committed 5 years ago

Commit 4e89a781 parent 61bb17d2 files · +3 −4Browse files

Unified · Split

2 files
  1. lib/test_bitmap.c +1 −2
  2. lib/test_printf.c +2 −2
lib/test_bitmap.c+1−2
@@ -16,8 +16,7 @@ · 15 unmodified lines
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+2−2
@@ -30,8 +30,8 @@ · 29 unmodified lines
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