From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: Cyril Hrubis <chrubis@suse.cz>,
Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v5 1/3] Refactor regen.sh script to generate syscalls
Date: Wed, 30 Oct 2024 15:20:58 +0100 [thread overview]
Message-ID: <4e4ff14e-43d8-4a97-8dd6-f8609cd38404@suse.com> (raw)
In-Reply-To: <ZyI42B6qhZCf0Qwo@yuki.lan>
Hi Cyril,
On 10/30/24 14:47, Cyril Hrubis wrote:
> Hi!
>> +(
>> + echo
>> + echo "/* Common stubs */"
>> + while IFS= read -r arch; do
>> + while IFS= read -r line; do
>> + set -- ${line}
>> + syscall_nr="__NR_$1"
>> + shift
>> +
>> + echo "# ifndef ${syscall_nr}"
>> + echo "# define ${syscall_nr} __LTP__NR_INVALID_SYSCALL"
>> + echo "# endif"
>> + done <"${SCRIPT_DIR}/${arch}.in"
>> + done <${SUPPORTED_ARCH}
>> + echo "#endif"
>> +) >>${SYSCALLS_FILE}
> This will generate multiple fallback definitions, one per architecture
> for common syscall, there was a good reason why these files were parsed
> by awk with sort -u
I wrote the code a few weeks ago, so I needed to read it again to
understand the reason.
If you take a look at the drop_bad_entries() and generate_tables() you
will see that `sort` command is used to remove duplicates and to sort
the entire list per architecture.
Or am I missing something?
>> -echo "#define __LTP__NR_INVALID_SYSCALL -1" >> "${output_pid}"
>> -for nr in $(awk '{print $1}' "${srcdir}/"*.in | sort -u) ; do
> This is the important part that IMHO should stay.
>
Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-10-30 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 8:52 [LTP] [PATCH v5 0/3] Automatically generate syscalls.h Andrea Cervesato
2024-10-30 8:53 ` [LTP] [PATCH v5 1/3] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-10-30 13:47 ` Cyril Hrubis
2024-10-30 14:20 ` Andrea Cervesato via ltp [this message]
2024-10-30 17:43 ` Cyril Hrubis
2024-10-30 14:49 ` Petr Vorel
2024-10-30 15:34 ` Andrea Cervesato via ltp
2024-10-30 16:49 ` Petr Vorel
2024-10-30 8:53 ` [LTP] [PATCH v5 2/3] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-10-30 14:04 ` Cyril Hrubis
2024-10-30 15:15 ` Petr Vorel
2024-10-30 15:24 ` Andrea Cervesato via ltp
2024-10-30 8:53 ` [LTP] [PATCH v5 3/3] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-10-30 14:04 ` Cyril Hrubis
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=4e4ff14e-43d8-4a97-8dd6-f8609cd38404@suse.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=andrea.cervesato@suse.de \
--cc=chrubis@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.