diff options
Diffstat (limited to 'test/self/core.c')
-rw-r--r-- | test/self/core.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/self/core.c b/test/self/core.c new file mode 100644 index 0000000000..caa4c27f6d --- /dev/null +++ b/test/self/core.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#define pr_fmt(fmt) "bselftest: " fmt + +#include <common.h> +#include <bselftest.h> + +LIST_HEAD(selftests); + +void selftests_run(void) +{ + struct selftest *test; + int err = 0; + + pr_notice("Configured tests will run now\n"); + + list_for_each_entry(test, &selftests, list) + err |= test->func(); + + if (err) + pr_err("Some selftests failed\n"); +} |