From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 2/4] Add script to generate arch(s) dependant syscalls
Date: Fri, 25 Oct 2024 12:20:37 +0200 [thread overview]
Message-ID: <20241025102037.GB681652@pevik> (raw)
In-Reply-To: <20241009-generate_syscalls-v4-2-5328a785bbad@suse.com>
Hi Andrea,
> 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.
Nice improvement, thanks!
> 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.
This C application is in the Linux kernel and we only consume the result right?
If the C app was needed to be run for LTP, that would broke LTP cross compilation.
(There are people compiling LTP with cross compilation, e.g. arm folks in yocto
and Buildroot, riscv64 on openSUSE Tumbleweed).
> diff --git a/include/lapi/syscalls/generate_arch.sh b/include/lapi/syscalls/generate_arch.sh
> new file mode 100755
> index 000000000..abdb52256
> --- /dev/null
> +++ b/include/lapi/syscalls/generate_arch.sh
> @@ -0,0 +1,205 @@
> +#!/bin/sh
> +#
> +# 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.
> +#
> +# Author: Andrea Cervesato <andrea.cervesato@suse.com>
nit: I would still use some SPDX + copyright here.
> +
> +KERNELSRC=$1
Generally all shell variables should be quoted to avoid problems with space.
Feel free to do that before merge.
KERNELSRC="$1"
> +
> +# to keep sorting in order
> +export LC_ALL=C
> +
> +if [ -z $KERNELSRC ]; then
Also here and on other places.
if [ -z "$KERNELSRC" ]; then
Try run script with:
KERNELSRC="foo bar"
[: aa: unexpected operator
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-10-25 10:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 9:45 [LTP] [PATCH v4 0/4] Automatically generate syscalls.h Andrea Cervesato
2024-10-09 9:45 ` [LTP] [PATCH v4 1/4] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-10-14 12:45 ` Li Wang
2024-10-25 10:03 ` Petr Vorel
2024-10-09 9:45 ` [LTP] [PATCH v4 2/4] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-10-15 8:12 ` Li Wang
2024-10-25 10:20 ` Petr Vorel [this message]
2024-10-30 8:40 ` Andrea Cervesato via ltp
2024-10-09 9:45 ` [LTP] [PATCH v4 3/4] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-10-15 8:10 ` Li Wang
2024-10-25 10:23 ` Petr Vorel
2024-10-09 9:45 ` [LTP] [PATCH v4 4/4] Update syscalls files Andrea Cervesato
2024-10-15 6:49 ` Li Wang
2024-10-15 7:04 ` Li Wang
2024-10-15 17:17 ` Petr Vorel
2024-10-23 12:34 ` Andrea Cervesato via ltp
2024-10-23 12:57 ` Petr Vorel
2024-10-23 14:30 ` Andrea Cervesato via ltp
2024-10-25 9:37 ` Petr Vorel
2024-10-23 12:11 ` Andrea Cervesato via ltp
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=20241025102037.GB681652@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox