WSL2-Linux-Kernel/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
Kconfig
Makefile kunit: split resource API impl from test.c into new resource.c 2022-04-04 16:23:14 -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
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
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
resource.c kunit: Rework kunit_resource allocation policy 2022-05-12 11:14:39 -06:00
string-stream-test.c
string-stream.c
string-stream.h
test.c kunit: take `kunit_assert` as `const` 2022-05-16 13:23:00 -06:00
try-catch-impl.h
try-catch.c kunit: make kunit_test_timeout compatible with comment 2022-03-22 15:57:11 -07:00