On 02.11.2023 22:01, Matthew Wilcox wrote: > On Thu, Nov 02, 2023 at 09:58:07PM +0100, Michal Wajdeczko wrote: >>> Why would using kunit be superior to the existing test suite? >> >> As said above IMO it's just a nice tool, that seems to be already used >> around. If you look for examples where kunit could win over existing >> ida test suite, then maybe that kunit allows to run only specific test >> cases or parametrize test cases or provide ready to use nicer diagnostic >> messages on missed expectations. It should also be easy (and can be >> done in unified way) to replace some external functions to trigger >> desired faults (like altering kzalloc() or xas_store() to force >> different code paths during our alloc). >> >> But since I'm a guest here, knowing that there could be different >> opinions on competing test suites, we can either drop this patch or >> convert new test cases with 'group' variants to the old test_ida suite >> (if that's really desired). > > AFAIK, kunit can't be used to extract the in-kernel IDA code and run it > in userspace like the current testsuite does (the current testsuite also > runs in-kernel, except for the multithreaded tests). So unless it has > that functionality, it seems like a regression to convert the existing > test-suite to kunit. But there is no need extract anything as kunit tests run in kernel space (or under QEMU/UML for convenience) so can access all in-kernel API. [1] https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html