summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2021-04-09 00:31:47 +0200
committerHeiko Carstens <hca@linux.ibm.com>2021-04-12 12:46:44 +0200
commit9d42a4d3e27db3cabad82483ed876d4c8b8bed65 (patch)
treea7c146cfc6864a9a2f84aafb1e661434a9334659 /arch/s390
parentf169f42130653bd4da24ed0d1b2cc91af5977928 (diff)
s390/test_unwind: add WARN if tests failed
Trigger a warning if any of unwinder tests fail. This should help to prevent quiet ignoring of test results when panic_on_warn is enabled. Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/lib/test_unwind.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c
index 54b36e71ddf3..eda72bc49c79 100644
--- a/arch/s390/lib/test_unwind.c
+++ b/arch/s390/lib/test_unwind.c
@@ -296,16 +296,18 @@ static int test_unwind_flags(int flags)
static int test_unwind_init(void)
{
- int ret = 0;
+ int failed = 0;
+ int total = 0;
#define TEST(flags) \
do { \
pr_info("[ RUN ] " #flags "\n"); \
+ total++; \
if (!test_unwind_flags((flags))) { \
pr_info("[ OK ] " #flags "\n"); \
} else { \
pr_err("[ FAILED ] " #flags "\n"); \
- ret = -EINVAL; \
+ failed++; \
} \
} while (0)
@@ -336,7 +338,8 @@ do { \
#endif
#undef TEST
- return ret;
+ WARN(failed, "%d of %d unwinder tests failed", failed, total);
+ return failed ? -EINVAL : 0;
}
static void test_unwind_exit(void)