linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst
@ 2022-01-31 21:23 Daniel Latypov
  2022-02-01  4:35 ` David Gow
  2022-03-29 21:27 ` Brendan Higgins
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Latypov @ 2022-01-31 21:23 UTC (permalink / raw)
  To: brendanhiggins, davidgow
  Cc: linux-kernel, kunit-dev, linux-kselftest, skhan, Daniel Latypov,
	Yifan Yuan

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.

Reported-by: Yifan Yuan <alpc_metic@live.com>
Signed-off-by: Daniel Latypov <dlatypov@google.com>
---
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(-)

diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index ad168d16968f..867a4bba6bf6 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst
  2022-01-31 21:23 [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst Daniel Latypov
@ 2022-02-01  4:35 ` David Gow
  2022-03-29 21:27 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: David Gow @ 2022-02-01  4:35 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: Brendan Higgins, Linux Kernel Mailing List, KUnit Development,
	open list:KERNEL SELFTEST FRAMEWORK, Shuah Khan, Yifan Yuan

On Tue, Feb 1, 2022 at 5:23 AM Daniel Latypov <dlatypov@google.com> wrote:
>
> 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.
>
> Reported-by: Yifan Yuan <alpc_metic@live.com>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> ---
> 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.

Reviewed-by: David Gow <davidgow@google.com>

Cheers,
-- David

>  Documentation/dev-tools/kunit/start.rst | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
> index ad168d16968f..867a4bba6bf6 100644
> --- a/Documentation/dev-tools/kunit/start.rst
> +++ b/Documentation/dev-tools/kunit/start.rst
> @@ -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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst
  2022-01-31 21:23 [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst Daniel Latypov
  2022-02-01  4:35 ` David Gow
@ 2022-03-29 21:27 ` Brendan Higgins
  1 sibling, 0 replies; 3+ messages in thread
From: Brendan Higgins @ 2022-03-29 21:27 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: davidgow, linux-kernel, kunit-dev, linux-kselftest, skhan, Yifan Yuan

On Mon, Jan 31, 2022 at 4:23 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> 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.
>
> Reported-by: Yifan Yuan <alpc_metic@live.com>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-29 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 21:23 [PATCH v2] Documentation: kunit: fix path to .kunitconfig in start.rst Daniel Latypov
2022-02-01  4:35 ` David Gow
2022-03-29 21:27 ` Brendan Higgins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).