public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v7 0/4] Automatically generate syscalls.h
@ 2024-10-31 11:57 Andrea Cervesato
  2024-10-31 11:57 ` [LTP] [PATCH v7 1/4] Refactor regen.sh script to generate syscalls Andrea Cervesato
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Andrea Cervesato @ 2024-10-31 11:57 UTC (permalink / raw)
  To: ltp

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 v7:
- check for errors in generate_syscalls.sh
- add documentation
- validation: https://github.com/acerv/ltp/actions/runs/11611080151
- Link to v6: https://lore.kernel.org/r/20241031-generate_syscalls-v6-0-1ad86a33ce2d@suse.com

Changes in v6:
- aesthetic changes in the syscall generator
- fix fallback definitions in the syscalls.h file generator 
- Link to v5: https://lore.kernel.org/r/20241030-generate_syscalls-v5-0-eed6a87dc787@suse.com

Changes in v5:
- license SPDX inside scripts files
- quote shell variables inside scripts
- some generic code cleanup
- Link to v4: https://lore.kernel.org/r/20241009-generate_syscalls-v4-0-5328a785bbad@suse.com

Changes in v4:
- remove blacklist file
- update syscalls files
- Link to v3: https://lore.kernel.org/r/20240930-generate_syscalls-v3-0-e56ede4bc7f5@suse.com

Changes in v3:
- fix generate_arch.sh to work properly for all architectures
- rename some arch .in files and handle renaming inside
  generate_syscalls.sh using the right gcc directives
- Link to v2: https://lore.kernel.org/r/20240927-generate_syscalls-v2-0-108f5f2ad318@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 (4):
      Refactor regen.sh script to generate syscalls
      Add script to generate arch(s) dependant syscalls
      Delete obsolete strip_syscall.awk file
      Add documentation about syscalls.h generator

 configure.ac                                       |   2 +-
 doc/developers/test_case_tutorial.rst              |  27 +--
 include/lapi/syscalls/{aarch64.in => arm64.in}     |   0
 include/lapi/syscalls/generate_arch.sh             | 211 +++++++++++++++++++++
 include/lapi/syscalls/generate_syscalls.sh         | 109 +++++++++++
 .../lapi/syscalls/{loongarch.in => loongarch64.in} |   0
 include/lapi/syscalls/{mips_n64.in => mips64.in}   |   0
 .../lapi/syscalls/{mips_n32.in => mips64n32.in}    |   0
 include/lapi/syscalls/{mips_o32.in => mipso32.in}  |   0
 include/lapi/syscalls/{hppa.in => parisc.in}       |   0
 include/lapi/syscalls/regen.sh                     | 129 -------------
 include/lapi/syscalls/strip_syscall.awk            |  19 --
 .../lapi/syscalls/{order => supported-arch.txt}    |  12 +-
 13 files changed, 341 insertions(+), 168 deletions(-)
---
base-commit: 84e77afb3acc4bc69c434c430cc1c1d000427921
change-id: 20240923-generate_syscalls-780dc2227bdb

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


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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-10-31 15:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 11:57 [LTP] [PATCH v7 0/4] Automatically generate syscalls.h Andrea Cervesato
2024-10-31 11:57 ` [LTP] [PATCH v7 1/4] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-10-31 13:01   ` Petr Vorel
2024-10-31 13:18     ` Cyril Hrubis
2024-10-31 13:44       ` Petr Vorel
2024-10-31 13:37     ` Andrea Cervesato via ltp
2024-10-31 14:08       ` Petr Vorel
2024-10-31 11:57 ` [LTP] [PATCH v7 2/4] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-10-31 13:58   ` Petr Vorel
2024-10-31 14:52     ` Andrea Cervesato via ltp
2024-10-31 15:31       ` pvorel
2024-10-31 11:57 ` [LTP] [PATCH v7 3/4] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-10-31 11:57 ` [LTP] [PATCH v7 4/4] Add documentation about syscalls.h generator Andrea Cervesato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox