s390/test_unwind: require that unwinding ended successfully
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 22 Nov 2019 16:37:50 +0000 (17:37 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sat, 30 Nov 2019 09:52:46 +0000 (10:52 +0100)
Currently unwinder test passes if unwinding results contain unwindme_func2
and unwindme_func1 functions.
Now that unwinder reports success upon reaching task pt_regs, check
that unwinding ended successfully in every test.

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/lib/test_unwind.c

index 5636da941f1fbb91978289cb399c085ca00be521..2839f8cb691d5ec8ce371148e57406457120a09c 100644 (file)
@@ -71,6 +71,10 @@ static noinline int test_unwind(struct task_struct *task, struct pt_regs *regs,
        }
 
        /* Check the results. */
+       if (unwind_error(&state)) {
+               pr_err("unwind error\n");
+               ret = -EINVAL;
+       }
        if (!seen_func2_func1) {
                pr_err("unwindme_func2 and unwindme_func1 not found\n");
                ret = -EINVAL;