Instead of defining the total/failed test counters manually, test drivers that are clients of kselftest should use the macro created for this purpose.
Unified · Split
| @@ -16,8 +16,7 @@ · 15 unmodified lines | |||
| 16 | 16 | ||
| 17 | #include "../tools/testing/selftests/kselftest_module.h" | 17 | #include "../tools/testing/selftests/kselftest_module.h" |
| 18 | 18 | ||
| 19 | static unsigned total_tests __initdata; | 19 | KSTM_MODULE_GLOBALS(); |
| 20 | static unsigned failed_tests __initdata; | ||
| 21 | 20 | ||
| 22 | static char pbl_buffer[PAGE_SIZE] __initdata; | 21 | static char pbl_buffer[PAGE_SIZE] __initdata; |
| 23 | 22 | ||
| @@ -30,8 +30,8 @@ · 29 unmodified lines | |||
| 30 | #define PAD_SIZE 16 | 30 | #define PAD_SIZE 16 |
| 31 | #define FILL_CHAR '$' | 31 | #define FILL_CHAR '$' |
| 32 | 32 | ||
| 33 | static unsigned total_tests __initdata; | 33 | KSTM_MODULE_GLOBALS(); |
| 34 | static unsigned failed_tests __initdata; | 34 | |
| 35 | static char *test_buffer __initdata; | 35 | static char *test_buffer __initdata; |
| 36 | static char *alloced_buffer __initdata; | 36 | static char *alloced_buffer __initdata; |
| 37 | 37 | ||