kunit: tool: add --kernel_args to allow setting module params
authorDaniel Latypov <dlatypov@google.com>
Thu, 15 Jul 2021 16:08:19 +0000 (09:08 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 13 Aug 2021 19:28:47 +0000 (13:28 -0600)
commit6cb51a1874d0617579a6bf095b87a510f7dc07ba
treedc4b5bd7e701c521bfd76d489dbced02e30f9902
parent1195505f5de2adfee5f277433f0b35498467cc64
kunit: tool: add --kernel_args to allow setting module params

kunit.py currently does not make it possible for users to specify module
parameters (/kernel arguments more generally) unless one directly tweaks
the kunit.py code itself.

This hasn't mattered much so far, but this would make it easier to port
existing tests that expose module parameters over to KUnit and/or let
current KUnit tests take advantage of them.

Tested using an kunit internal parameter:
$ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit \
    --kernel_args=kunit.filter_glob=kunit_status
...
Testing complete. 2 tests run. 0 failed. 0 crashed. 0 skipped.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kunit/running_tips.rst
tools/testing/kunit/kunit.py
tools/testing/kunit/kunit_tool_test.py