[LTP] [PATCH 2/9] doc: Correct guide and API descriptions
Petr Vorel
pvorel@suse.cz
Thu Sep 10 21:32:31 CEST 2026
Hi Andrea,
Again, very good catches. Thank you!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
...
> diff --git a/doc/developers/build_system.rst b/doc/developers/build_system.rst
> index 8af431517..e62db7d97 100644
> --- a/doc/developers/build_system.rst
> +++ b/doc/developers/build_system.rst
> @@ -135,7 +135,7 @@ been fulfilled (libraries, headers, etc).
> * - $(CC)
> - The system C compiler
> - * - $(CCP)
> + * - $(CPP)
+1 (obviously nobody reads the docs as no human found that :)).
> +++ b/doc/developers/test_case_tutorial.rst
Test case tutorial would deserve update (some things are updated.
Also it might concentrate too much on git skills.
Also, it'd be nice to use link functions (tst_brk(), tst_res(), SAFE_CLOSE())
and TINFO/TCONF/... to kerneldoc, but I can do it later.
> @@ -205,7 +205,7 @@ please do:
> This should build the test and then run it. However, even though the test is
> in :master:`testcases/kernel/syscalls` directory it won't be automatically run
> -as part of the syscalls test group (e.g. not run via ``kirk -f math``).
> +as part of the syscalls test group (e.g. not run via ``kirk -f syscalls``).
> For this we need to add it to the runtest file. So open :master:`runtest/syscalls`
> and add the lines starting with a ``+``.
> @@ -292,7 +292,7 @@ Check coding style with ``make check``.
> Install the LTP and run the test with runtest
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -Run ``statx01`` on its own, also using ``-I0`` amd ``-I10``.
> +Run ``statx01`` on its own, also using ``-i 10`` and ``-I 10``.
nit: Both ways are working, I usually use the shorter variant (-i0).
> Call the system call
> --------------------
> @@ -435,7 +435,7 @@ there is a system in place to handle it.
> .min_kver = "4.11",
> };
> -The ``TEST`` macro sets ``TST_RET`` to the return value of ``tst_statx()`` and
> +The ``TEST`` macro sets ``TST_RET`` to the return value of ``sys_statx()`` and
> ``TST_ERR`` to the value of ``errno`` immediately after the functions
> return. This is mainly just for convenience, although it potentially could
> have other uses.
> @@ -589,6 +589,9 @@ again on the hard-link, then ``stat`` the file".
> #define LNAME "file_to_stat_link"
> + static int fd = -1;
> + static int lfd = -1;
> +
> ...
> static void setup(void)
> @@ -600,10 +603,10 @@ again on the hard-link, then ``stat`` the file".
While you're at it, could you please fix ... indent?
Kind regards,
Petr
+++ doc/developers/test_case_tutorial.rst
@@ -612,7 +612,7 @@ again on the hard-link, then ``stat`` the file".
static void run(void)
{
- ...
+ ...
TEST(sys_statx(AT_FDCWD, LNAME, 0, STATX_BASIC_STATS, &statxbuf));
if (TST_RET == 0)
> static void cleanup(void)
> {
> - if (lfd != 0)
> + if (lfd != -1)
> SAFE_CLOSE(lfd);
> - if (fd != 0)
> + if (fd != -1)
> SAFE_CLOSE(fd);
> }
More information about the ltp
mailing list