From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] Replace ltp_syscall with tst_syscall
Date: Mon, 24 Jan 2022 21:48:08 +0100 [thread overview]
Message-ID: <Ye8QiIUfmKeUrSmg@pevik> (raw)
In-Reply-To: <20220124150533.25935-1-andrea.cervesato@suse.de>
Hi Andrea,
> diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
> index d7daf8ad0..77391dbdf 100755
> --- a/include/lapi/syscalls/regen.sh
> +++ b/include/lapi/syscalls/regen.sh
> @@ -35,21 +35,17 @@ cat << EOF > "${output_pid}"
> #include <asm/unistd.h>
> #include "cleanup.c"
> -#define ltp_syscall(NR, ...) ({ \\
> - int __ret; \\
> - if (NR == __LTP__NR_INVALID_SYSCALL) { \\
> - errno = ENOSYS; \\
> - __ret = -1; \\
> - } else { \\
> - __ret = syscall(NR, ##__VA_ARGS__); \\
> - } \\
> - if (__ret == -1 && errno == ENOSYS) { \\
> - tst_brkm(TCONF, CLEANUP, \\
> - "syscall(%d) " #NR " not supported on your arch", \\
> - NR); \\
> - } \\
> - __ret; \\
> +#ifdef TST_TEST_H__
> +#define TST_SYSCALL_BRK__(NR) ({ \
> + tst_brk(TCONF, \
> + "syscall(%d) " #NR " not supported on your arch", NR); \
> +})
> +#else
> +#define TST_SYSCALL_BRK__(NR) ({ \
> + tst_brkm(TCONF, CLEANUP, \
> + "syscall(%d) " #NR " not supported on your arch", NR); \
> })
> +#endif
I miss this in my review. Cyril meant to put double backslashes also
here in regen.sh (as it was in original version). The result is then:
#ifdef TST_TEST_H__
#define TST_SYSCALL_BRK__(NR) ({ tst_brk(TCONF, "syscall(%d) " #NR " not supported on your arch", NR); })
#else
#define TST_SYSCALL_BRK__(NR) ({ tst_brkm(TCONF, CLEANUP, "syscall(%d) " #NR " not supported on your arch", NR); })
#endif
instead of:
#ifdef TST_TEST_H__
#define TST_SYSCALL_BRK__(NR) ({ \
tst_brk(TCONF, \
"syscall(%d) " #NR " not supported on your arch", NR); \
})
#else
#define TST_SYSCALL_BRK__(NR) ({ \
tst_brkm(TCONF, CLEANUP, \
"syscall(%d) " #NR " not supported on your arch", NR); \
})
#endif
Merging it with this fix.
Thanks a lot!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-01-24 20:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 15:05 [LTP] [PATCH v3] Replace ltp_syscall with tst_syscall Andrea Cervesato
2022-01-24 15:21 ` Petr Vorel
2022-01-24 20:48 ` Petr Vorel [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=Ye8QiIUfmKeUrSmg@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 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.