Skip to contentSkip to conversation

Documentation: kunit: fix path to .kunitconfig in start.rst

PATCH In review Daniel Latypov 3 participants 3 messages Jan 31, 2022 – Mar 29, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Documentation: kunit: fix path to .kunitconfig in start.rst

Commit ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") changed the default --build_dir, which had the side effect of making .kunitconfig move to .kunit/.kunitconfig.

However, the first few lines of kunit/start.rst never got updated, oops.

Fix this by telling people to run kunit.py first, which will automatically generate the .kunit directory and .kunitconfig file, and then edit the file manually as desired.

---
v1 -> v2: rebase onto 5.17 (had the kunit docs rewrite)

---
 Documentation/dev-tools/kunit/start.rst | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/dev-tools/kunit/start.rst +8 -3
index ad168d16968f..867a4bba6bf6 100644
@@ -41,13 +41,18 @@ or ``VFAT_FS``. To run ``FAT_KUNIT_TEST``, the ``.kunitconfig`` has:
 	CONFIG_MSDOS_FS=y
 	CONFIG_FAT_KUNIT_TEST=y
 
-1. A good starting point for the ``.kunitconfig``, is the KUnit default
-   config. Run the command:
+1. A good starting point for the ``.kunitconfig`` is the KUnit default config.
+   You can generate it by running:
 
 .. code-block:: bash
 
 	cd $PATH_TO_LINUX_REPO
-	cp tools/testing/kunit/configs/default.config .kunitconfig
+	tools/testing/kunit/kunit.py config
+	cat .kunit/.kunitconfig
+
+.. note ::
+   ``.kunitconfig`` lives in the ``--build_dir`` used by kunit.py, which is
+   ``.kunit`` by default.
 
 .. note ::
    You may want to remove CONFIG_KUNIT_ALL_TESTS from the ``.kunitconfig`` as

base-commit: c2741453478badf571ef020d160053e8d5e1ba94

Signature · 1 line
2.35.0.rc2.247.g8bbb082509-goog
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Daniel Latypov

Commit ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") changed the default --build_dir, which had the side effect of making .kunitconfig move to .kunit/.kunitconfig.

However, the first few lines of kunit/start.rst never got updated, oops.

Fix this by telling people to run kunit.py first, which will automatically generate the .kunit directory and .kunitconfig file, and then edit the file manually as desired.

Quoted 5 lines

---
v1 -> v2: rebase onto 5.17 (had the kunit docs rewrite)
---

Looks good: this was definitely confusing. And (my version of) sphinx doesn't complain, which is reassuring.

Cheers,
-- David

Quoted 34 lines
 Documentation/dev-tools/kunit/start.rst | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/dev-tools/kunit/start.rst +8 -3
index ad168d16968f..867a4bba6bf6 100644
@@ -41,13 +41,18 @@ or ``VFAT_FS``. To run ``FAT_KUNIT_TEST``, the ``.kunitconfig`` has:
        CONFIG_MSDOS_FS=y
        CONFIG_FAT_KUNIT_TEST=y
 
-1. A good starting point for the ``.kunitconfig``, is the KUnit default
-   config. Run the command:
+1. A good starting point for the ``.kunitconfig`` is the KUnit default config.
+   You can generate it by running:
 
 .. code-block:: bash
 
        cd $PATH_TO_LINUX_REPO
-       cp tools/testing/kunit/configs/default.config .kunitconfig
+       tools/testing/kunit/kunit.py config
+       cat .kunit/.kunitconfig
+
+.. note ::
+   ``.kunitconfig`` lives in the ``--build_dir`` used by kunit.py, which is
+   ``.kunit`` by default.
 
 .. note ::
    You may want to remove CONFIG_KUNIT_ALL_TESTS from the ``.kunitconfig`` as

base-commit: c2741453478badf571ef020d160053e8d5e1ba94 --
2.35.0.rc2.247.g8bbb082509-goog

Reviewed-by on v2 1/1
#2 lore raw
In reply to Daniel Latypov
Quoted 5 lines · Daniel Latypov

Commit ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") changed the default --build_dir, which had the side effect of making .kunitconfig move to .kunit/.kunitconfig.

Quoted 8 lines

However, the first few lines of kunit/start.rst never got updated, oops.

Fix this by telling people to run kunit.py first, which will automatically generate the .kunit directory and .kunitconfig file, and then edit the file manually as desired.