All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Cc: Jonathan Corbet <corbet@lwn.net>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <davidgow@google.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Khalid Masum <khalid.masum.92@gmail.com>,
	Sadiya Kazi <sadiyakazi@google.com>,
	Bagas Sanjaya <bagasdotme@gmail.com>
Subject: [PATCH 2/7] Documentation: kunit: align instruction code blocks
Date: Sun, 23 Oct 2022 19:54:09 +0700	[thread overview]
Message-ID: <20221023125414.60961-3-bagasdotme@gmail.com> (raw)
In-Reply-To: <20221023125414.60961-1-bagasdotme@gmail.com>

Align code blocks in "Writing Your First Test" instructions list so that
these blocks will be rendered at the same level as surrounding
paragraphs in the list.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/dev-tools/kunit/start.rst | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index 590e25166efb0d..cdf043b6550e66 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -187,13 +187,13 @@ which performs addition of two integers.
    a. Create a new header file ``drivers/misc/example.h`` and add the
       prototype for ``misc_example_add()``:
 
-.. code-block:: c
+      .. code-block:: c
 
 	int misc_example_add(int left, int right);
 
    b. Write the function implementation in ``drivers/misc/example.c``:
 
-.. code-block:: c
+      .. code-block:: c
 
 	#include <linux/errno.h>
 
@@ -207,7 +207,7 @@ which performs addition of two integers.
    c. In order for the driver to be selected, add configuration entry to
       ``drivers/misc/Kconfig``:
 
-.. code-block:: kconfig
+      .. code-block:: kconfig
 
 	config MISC_EXAMPLE
 		bool "My example"
@@ -215,7 +215,7 @@ which performs addition of two integers.
    d. Last but not least, append the make goal to ``drivers/misc/Makefile``
       so that the driver can be built:
 
-.. code-block:: make
+      .. code-block:: make
 
 	obj-$(CONFIG_MISC_EXAMPLE) += example.o
 
@@ -224,7 +224,7 @@ which performs addition of two integers.
 
    a. Write the test in ``drivers/misc/example_test.c``:
 
-.. code-block:: c
+      .. code-block:: c
 
 	#include <kunit/test.h>
 	#include "example.h"
@@ -259,7 +259,7 @@ which performs addition of two integers.
 
    b. Add configuration entry for the test suite to ``drivers/misc/Kconfig``:
 
-.. code-block:: kconfig
+      .. code-block:: kconfig
 
 	config MISC_EXAMPLE_TEST
 		tristate "Test for my example" if !KUNIT_ALL_TESTS
@@ -268,27 +268,27 @@ which performs addition of two integers.
 
    c. Append make goal for the configuration to ``drivers/misc/Makefile``: 
 
-.. code-block:: make
+      .. code-block:: make
 
 	obj-$(CONFIG_MISC_EXAMPLE_TEST) += example_test.o
 
 3. In order to enable the driver and its test suite, append configuration
    fragment to ``.kunit/.kunitconfig``:
 
-.. code-block:: none
+   .. code-block:: none
 
 	CONFIG_MISC_EXAMPLE=y
 	CONFIG_MISC_EXAMPLE_TEST=y
 
 4. Run the test:
 
-.. code-block:: bash
+   .. code-block:: bash
 
 	./tools/testing/kunit/kunit.py run
 
 You should see the following output:
 
-.. code-block:: none
+   .. code-block:: none
 
 	...
 	[16:08:57] [PASSED] misc-example:misc_example_add_test_basic
-- 
An old man doll... just what I always wanted! - Clara


  parent reply	other threads:[~2022-10-23 12:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 12:54 [PATCH 0/7] KUnit documentation rewording Bagas Sanjaya
2022-10-23 12:54 ` [PATCH 1/7] Documentation: kunit: rewrite "Writing Your First Test" section Bagas Sanjaya
2022-10-23 12:54 ` Bagas Sanjaya [this message]
2022-10-23 12:54 ` [PATCH 3/7] Documentation: kunit: rewrite the rest of "Getting Started" documentation Bagas Sanjaya
2022-11-11 19:46   ` Daniel Latypov
2022-10-23 12:54 ` [PATCH 4/7] Documentation: kunit: move introduction to its own document Bagas Sanjaya
2022-10-23 12:54 ` [PATCH 5/7] Documentation: kunit: rewrite "Running tests with kunit_tool" Bagas Sanjaya
2022-10-23 12:54 ` [PATCH 6/7] Documentation: kunit: rewrite "Run Tests without kunit_tool" Bagas Sanjaya
2022-10-23 12:54 ` [PATCH 7/7] Documentation: kunit: rewrite usage Bagas Sanjaya
2022-10-23 13:08   ` Bagas Sanjaya
2022-10-23 12:54 ` [PATCH 7/7] Documentation: kunit: rewrite "Writing tests" Bagas Sanjaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221023125414.60961-3-bagasdotme@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=brendan.higgins@linux.dev \
    --cc=corbet@lwn.net \
    --cc=davidgow@google.com \
    --cc=khalid.masum.92@gmail.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=sadiyakazi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.