From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/1] regen.sh: tst_syscall(): Print again syscall number as string
Date: Fri, 18 Feb 2022 02:03:04 +0000 [thread overview]
Message-ID: <620EFE77.60304@fujitsu.com> (raw)
In-Reply-To: <20220217184554.26915-1-pvorel@suse.cz>
Hi Petr
Obviously correct, pushed.
Best Regards
Yang Xu
> Before 4913b0b298 tst_syscall() printed:
> TCONF: syscall(434) __NR_pidfd_open not supported
>
> After 4913b0b298 tst_syscall() printed only numbers:
> TCONF: syscall(434) 434 not supported on your arch
>
> Constant was passed to TST_SYSCALL_BRK__() as a number thus
> stringification didn't work as expected.
>
> Fixes: 4913b0b298 ("lapi,kernel: Replace ltp_syscall with tst_syscall")
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> include/lapi/syscalls/regen.sh | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
> index 0b412ef6d9..3bf38fd034 100755
> --- a/include/lapi/syscalls/regen.sh
> +++ b/include/lapi/syscalls/regen.sh
> @@ -36,14 +36,14 @@ cat<< EOF> "${output_pid}"
> #include "cleanup.c"
>
> #ifdef TST_TEST_H__
> -#define TST_SYSCALL_BRK__(NR) ({ \\
> +#define TST_SYSCALL_BRK__(NR, SNR) ({ \\
> tst_brk(TCONF, \\
> - "syscall(%d) " #NR " not supported on your arch", NR); \\
> + "syscall(%d) " SNR " not supported on your arch", NR); \\
> })
> #else
> -#define TST_SYSCALL_BRK__(NR) ({ \\
> +#define TST_SYSCALL_BRK__(NR, SNR) ({ \\
> tst_brkm(TCONF, CLEANUP, \\
> - "syscall(%d) " #NR " not supported on your arch", NR); \\
> + "syscall(%d) " SNR " not supported on your arch", NR); \\
> })
> #endif
>
> @@ -56,7 +56,7 @@ cat<< EOF> "${output_pid}"
> tst_ret = syscall(NR, ##__VA_ARGS__); \\
> } \\
> if (tst_ret == -1&& errno == ENOSYS) { \\
> - TST_SYSCALL_BRK__(NR); \\
> + TST_SYSCALL_BRK__(NR, #NR); \\
> } \\
> tst_ret; \\
> })
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-02-18 2:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 18:45 [LTP] [PATCH 1/1] regen.sh: tst_syscall(): Print again syscall number as string Petr Vorel
2022-02-18 2:03 ` xuyang2018.jy [this message]
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=620EFE77.60304@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@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.