Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
thunderbolt: test: get running under UML, add kunitconfig
These tests didn't work under the normal `kunit.py run` command since they require CONFIG_PCI=y, which could not be set on ARCH=um. Commit 68f5d3f ("um: add PCI over virtio emulation driver") lets us do so. To make it so people don't have to figure out how to do so, we add a drivers/thunderbolt/.kunitconfig. Can now run these tests using $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/thunderbolt Potentially controversial bits: 1. this .kunitconfig is UML-specific, can't do this for example $ ./tools/testing/kunit/kunit.py run --arch=x86_64 --kunitconfig=drivers/thunderbolt 2. this removes the manual call to __kunit_test_suites_init(), which allowed us to control exactly when the tests got run. The main motivation for both is convenience. For #1, we could drop the UML specific options, but then users would always have to set --arch. Since UML is a bit faster and there's less to type when running it with kunit.py, let's make it work by default. Users can manually edit the .kunitconfig to run under x86_64. For #2, running our suite separately prevents kunit.py from picking up results properly as it only parses one set of KUnit results. I.e. there's an assumption that __kunit_test_suites_init() only gets called once. Since the tests seem to run fine when kunit runs them, giving up this control seems fine. Signed-off-by: Daniel Latypov <dlatypov@google.com>
- Loading branch information