All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v8 4/4] Add documentation about syscalls.h generator
Date: Fri, 1 Nov 2024 08:56:44 +0100	[thread overview]
Message-ID: <20241101075644.GB1145995@pevik> (raw)
In-Reply-To: <ZyOw8qyh3py6wO8t@yuki.lan>

HI Andrea, Cyril,

> > +++ b/doc/developers/test_case_tutorial.rst
> > @@ -302,24 +302,25 @@ for a distribution's C library version to be older than its kernel or it may use
> >  cut down C library in comparison to the GNU one. So we must call ``statx()``
> >  using the general ``syscall()`` interface.

> > -The LTP contains a library for dealing with the ``syscall`` interface, which is
> > +LTP contains a library for dealing with the ``syscall`` interface, which is
> >  located in :master:`include/lapi`. System call numbers are listed against the relevant
> >  call in the ``*.in`` files (e.g. ``x86_64.in``) which are used to generate
> > -``syscalls.h``, which is the header you should include. On rare occasions you
> > -may find the system call number is missing from the ``*.in`` files and will need
> > -to add it (see :master:`include/lapi/syscalls/strip_syscall.awk`).
> > +``syscalls.h``, the header you should include.

> > -System call numbers vary between architectures, hence there are multiple
> > -``*.in`` files for each architecture.

> I would keep this sentence in there, probably as a last sentence in the
> upper paragraph.

+1

> > - You can find the various values for the
> > -``statx`` system call across a number of ``unistd.h`` files in the Linux kernel.
> > +On rare occasions, you may find that system call number is missing from ``*.in``
> > +files. In these cases, they will need to be updated using
> > +`include/lapi/syscalls/generate_arch.sh` script as following:
>         ^
> 	Just `generate_arch.sh` here, we list the full path in the code
> 	block, no need to repeat it here as well.
+1. BTW it should be either ``generate_arch.sh`` (double `` is used for
other commands, e.g. ``make check`` or ``./configure``) or it could be a link to
a source:

:master:`include/lapi/syscalls/generate_arch.sh` script as following:

I like links, because reader can see the script content. Also it can help to
verify whether the script is still at the repository (was not moved/deleted).

> > -Note that we don't use the system-call-identifier value available in
> > -``/usr/include/linux/uinstd.h`` because the kernel might be much newer than the
> > -user land development packages.
> > +.. code-block:: bash
> > +
> > +    $ include/lapi/syscalls/generate_arch.sh /path/of/linux/sources
>                                                       ^
> 						      to

very nit: "path/to/Linux/kernel/sources" (upper "L", which you use later, also
it's used in the script).

> > +The script will generate all the needed ``*.in`` files according to the Linux
>                                                             ^
> 							  accordingly
+1
> > +source code which has been used. Make sure that your Linux source code has
> > +been updated to the latest version.

> > -For ``statx`` we had to add ``statx 332`` to :master:`include/lapi/syscalls/x86_64.in`,
> > -``statx 383`` to :master:`include/lapi/syscalls/powerpc.in`, etc.  Now lets look at
> > -the code, which I will explain in more detail further down.
> > +Once the new syscalls files have been updated, to rebuild our ``syscalls.h``
> > +file, please use ``./configure`` command.
>             ^                         ^
> 	 re-run			      script
+1

Otherwise LGTM, thanks a lot for bothering with the docs.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2024-11-01  7:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 16:01 [LTP] [PATCH v8 0/4] Automatically generate syscalls.h Andrea Cervesato
2024-10-31 16:01 ` [LTP] [PATCH v8 1/4] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-10-31 16:21   ` Cyril Hrubis
2024-11-01  7:39     ` Petr Vorel
2024-11-01  8:07       ` Andrea Cervesato via ltp
2024-10-31 16:01 ` [LTP] [PATCH v8 2/4] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-11-01  9:18   ` Petr Vorel
2024-10-31 16:01 ` [LTP] [PATCH v8 3/4] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-10-31 16:01 ` [LTP] [PATCH v8 4/4] Add documentation about syscalls.h generator Andrea Cervesato
2024-10-31 16:31   ` Cyril Hrubis
2024-11-01  7:56     ` Petr Vorel [this message]

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=20241101075644.GB1145995@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.