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 <timur@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Marco Elver <elver@google.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210214161348.369023-2-timur@kernel.org

(cherry picked from commit 4e89a78779647ca7ee2967551c599633fe9d3647)
Bug: 181049978
Change-Id: I8f5fc8ba3bcfd60be11a302955bd375a64eedcd4
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
This commit is contained in:
Timur Tabi 2021-02-14 10:13:46 -06:00 committed by Suren Baghdasaryan
parent 9784fbe79d
commit 6b2db01255
2 changed files with 3 additions and 4 deletions

View File

@ -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;

View File

@ -30,8 +30,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;