linux-stable/lib/kunit
Daniel Latypov 1b11063d32 kunit: fix executor OOM error handling logic on non-UML
The existing logic happens to work fine on UML, but is not correct when
running on other arches.

1. We didn't initialize `int err`, and kunit_filter_suites() doesn't
   explicitly set it to 0 on success. So we had false "failures".
   Note: it doesn't happen on UML, causing this to get overlooked.
2. If we error out, we do not call kunit_handle_shutdown().
   This makes kunit.py timeout when using a non-UML arch, since the QEMU
   process doesn't ever exit.

Fixes: a02353f491 ("kunit: bail out of test filtering logic quicker if OOM")
Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-05-17 10:01:40 -06:00
..
.kunitconfig kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment 2021-04-02 14:14:36 -06:00
assert.c kunit: factor out str constants from binary assertion structs 2022-01-31 11:55:39 -07:00
debugfs.c kunit: fix debugfs code to use enum kunit_status, not bool 2022-05-02 12:36:03 -06:00
debugfs.h kunit: add debugfs /sys/kernel/debug/kunit/<suite>/results display 2020-03-26 14:07:18 -06:00
executor.c kunit: fix executor OOM error handling logic on non-UML 2022-05-17 10:01:40 -06:00
executor_test.c kunit: bail out of test filtering logic quicker if OOM 2022-05-12 11:15:08 -06:00
Kconfig kunit: add kunit.filter_glob cmdline option to filter suites 2021-02-08 16:09:27 -07:00
kunit-example-test.c kunit: add ability to specify suite-level init and exit functions 2022-05-02 12:35:51 -06:00
kunit-test.c kunit: Make kunit_remove_resource() idempotent 2022-04-05 13:32:50 -06:00
Makefile kunit: split resource API impl from test.c into new resource.c 2022-04-04 16:23:14 -06:00
resource.c kunit: Rework kunit_resource allocation policy 2022-05-12 11:14:39 -06:00
string-stream-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
string-stream.c kunit: generalize kunit_resource API beyond allocated resources 2020-06-26 14:12:00 -06:00
string-stream.h isystem: ship and use stdarg.h 2021-08-19 09:02:55 +09:00
test.c kunit: take kunit_assert as const 2022-05-16 13:23:00 -06:00
try-catch-impl.h kunit: hide unexported try-catch interface in try-catch-impl.h 2020-01-09 16:42:09 -07:00
try-catch.c kunit: make kunit_test_timeout compatible with comment 2022-03-22 15:57:11 -07:00