[LTP] [PATCH v5 2/3] Add script to generate arch(s) dependant syscalls
Petr Vorel
pvorel@suse.cz
Wed Oct 30 16:15:13 CET 2024
Hi Andrea,
> From: Andrea Cervesato <andrea.cervesato@suse.com>
> Add generate_arch.sh script which can be used to generate arch(s)
> dependant syscalls file. The way it works is pretty simple: for each
> architecture defined into supported-arch.txt, compile kernel headers,
> extract the list of syscalls and generate a .in file containing all of
> them, associated with their own syscall's number.
> The way syscalls files are generated, passes through a C application
> which is automatically checking the availability of the syscalls in
> the user space environment.
Thanks for this!
...
> --- /dev/null
> +++ b/include/lapi/syscalls/generate_arch.sh
> @@ -0,0 +1,211 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# This is an adaptation of the update-tables.sh script, included in the
> +# syscalls-table project (https://github.com/hrw/syscalls-table) and released
> +# under the MIT license.
I was surprised you use shell instead of python, but I see the original author
also use shell [1]. I wish he would have used python for this part, but good
that you reuse what was available.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
...
> +++ b/include/lapi/syscalls/supported-arch.txt
> @@ -1,13 +1,13 @@
> -aarch64
> arc
> +arm64
> arm
> -hppa
> i386
> ia64
> -loongarch
> -mips_n32
> -mips_n64
> -mips_o32
> +loongarch64
> +mips64n32
> +mips64
> +mipso32
> +parisc
> powerpc64
> powerpc
> s390x
Interesting enough how many archs the original project supports [2], which makes
sense for it as he products HTML table as reference [3].
Kind regards,
Petr
[1] https://github.com/hrw/syscalls-table/blob/master/scripts/update-tables.sh
[2] https://github.com/hrw/syscalls-table/blob/master/system_calls/architectures_in_kernel.py
[3] https://gpages.juszkiewicz.com.pl/syscalls-table/syscalls.html
More information about the ltp
mailing list