Documentation: kunit: fix example run_kunit func to allow spaces in args
authorDaniel Latypov <dlatypov@google.com>
Wed, 18 May 2022 17:01:22 +0000 (10:01 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 11 Jul 2022 22:33:51 +0000 (16:33 -0600)
Without the quoting, the example will mess up invocations like
$ run_kunit "Something with spaces"

Note: this example isn't valid, but if ever a usecase arises where a
flag argument might have spaces in it, it'll break.

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

index 205ea21c9cca6d99b2bc6a5657c993f00e6df0fc..8e8c493f17d1b003e0b52727bf634161eb6c3dd0 100644 (file)
@@ -15,7 +15,7 @@ It can be handy to create a bash function like:
 .. code-block:: bash
 
        function run_kunit() {
-         ( cd "$(git rev-parse --show-toplevel)" && ./tools/testing/kunit/kunit.py run $@ )
+         ( cd "$(git rev-parse --show-toplevel)" && ./tools/testing/kunit/kunit.py run "$@" )
        }
 
 .. note::