Re: [PATCH] Documentation: kunit: rewrite writing first test instructions

From: Bagas Sanjaya
Date: Thu Sep 29 2022 - 09:01:29 EST


On 9/29/22 19:54, Bagas Sanjaya wrote:
> Writing Your First Test
> =======================
> -In your kernel repository, let's add some code that we can test.
> +In your kernel repository, let's add some code that we can test. For this
> +purpose, we are going to add simple addition driver.
>
> -1. Create a file ``drivers/misc/example.h``, which includes:
> +1. Write the feature that will be tested. First, write the declaration
> + for ``misc_example_add()`` in ``drivers/misc/example.h``:
>
> -.. code-block:: c
> + .. code-block:: c
>
> int misc_example_add(int left, int right);
>
> -2. Create a file ``drivers/misc/example.c``, which includes:
> + Then implement the function in ``drivers/misc/example.c``:
>
> -.. code-block:: c
> + .. code-block:: c
>
> #include <linux/errno.h>
>
> @@ -152,24 +154,25 @@ In your kernel repository, let's add some code that we can test.
> return left + right;
> }
>
> -3. Add the following lines to ``drivers/misc/Kconfig``:
> +3. Add Kconfig menu entry for the feature to ``drivers/misc/Kconfig``:
>

The numbering looks jumped. Please ignore this patch as I'll resend shortly.

--
An old man doll... just what I always wanted! - Clara