[LTP] [PATCH v6 0/3] Automatically generate syscalls.h
Cyril Hrubis
chrubis@suse.cz
Thu Oct 31 11:02:46 CET 2024
Hi!
> > The problem we have at the moment is that all syscalls input files must
> > be changed by hand each time we need to test a new syscall. The idea is
> > to simplify this process, providing a script that is able to read from
> > kernel sources and to generate all syscalls files we need.
>
> > This patch set adds a new command inside the syscalls folder and
> > it refactors the previous regen.sh code.
> > The new way we have to generate the syscalls.h file is the following:
>
> > include/lapi/syscalls/generate_arch.sh path/to/kernel/source
> > include/lapi/syscalls/generate_syscalls.sh path/to/syscalls.h
>
> > Scripts are independent and they can be run separately.
> > generate_syscalls.sh is the equivalent of regen.sh, but its code has
> > been cleaned up.
>
> it would be nice to have this documented (as a separate effort, not blocking
> to merge this). Specially the new generate_arch.sh, which is not part of
> ./configure run.
We need something as:
The generate_arch.sh is supposed to be run when you start writing new
test and find out that the syscall number definitions you need are not
available in the LTP fallback header include/syscalls.h. You need to
point the script to a recent Linux kernel sources and it will pull an
update for the LTP syscall number tables. The tables then needs to be
updated in a separate git commit. You also need to re-run configure to
get the header updated from the tables.
To be put into the "how to write a test" documentation.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list