[LTP] [PATCH v2 0/5] Automatically generate syscalls.h

Andrea Cervesato andrea.cervesato@suse.de
Fri Sep 27 11:49:20 CEST 2024


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.

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v2:
- refactor regen.sh
- split syscalls.h and syscalls .in files creation
- updated syscalls .in files
- Link to v1: https://lore.kernel.org/r/20240924-generate_syscalls-v1-0-941507a9cdac@suse.com

---
Andrea Cervesato (5):
      Refactor regen.sh script to generate syscalls
      Add script to generate arch(s) dependant syscalls
      Update ia64.in syscalls file
      Delete obsolete strip_syscall.awk file
      Update syscalls files

 configure.ac                                       |   2 +-
 include/lapi/syscalls/aarch64.in                   | 306 -------
 include/lapi/syscalls/arc.in                       | 325 -------
 include/lapi/syscalls/arm.in                       | 404 ---------
 include/lapi/syscalls/blacklist-syscalls.txt       |   6 +
 include/lapi/syscalls/generate_arch.sh             | 182 ++++
 include/lapi/syscalls/generate_syscalls.sh         | 115 +++
 include/lapi/syscalls/hppa.in                      |  52 --
 include/lapi/syscalls/i386.in                      | 439 ----------
 include/lapi/syscalls/ia64.in                      | 956 +++++++++++++--------
 include/lapi/syscalls/loongarch.in                 | 310 -------
 include/lapi/syscalls/mips_n32.in                  | 379 --------
 include/lapi/syscalls/mips_n64.in                  | 355 --------
 include/lapi/syscalls/mips_o32.in                  | 425 ---------
 include/lapi/syscalls/powerpc.in                   | 432 ----------
 include/lapi/syscalls/powerpc64.in                 | 432 ----------
 include/lapi/syscalls/regen.sh                     | 129 ---
 include/lapi/syscalls/s390.in                      | 419 ---------
 include/lapi/syscalls/s390x.in                     | 367 --------
 include/lapi/syscalls/sh.in                        | 413 ---------
 include/lapi/syscalls/sparc.in                     | 418 ---------
 include/lapi/syscalls/sparc64.in                   | 383 ---------
 include/lapi/syscalls/strip_syscall.awk            |  19 -
 .../lapi/syscalls/{order => supported-arch.txt}    |   2 +-
 include/lapi/syscalls/x86_64.in                    | 396 ---------
 25 files changed, 909 insertions(+), 6757 deletions(-)
---
base-commit: 08cb938197e82eddce146662a47ff990827ff60a
change-id: 20240923-generate_syscalls-780dc2227bdb

Best regards,
-- 
Andrea Cervesato <andrea.cervesato@suse.com>



More information about the ltp mailing list