From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v6 1/3] Refactor regen.sh script to generate syscalls
Date: Thu, 31 Oct 2024 11:28:28 +0100 [thread overview]
Message-ID: <ZyNbzFs39LOOLgV7@yuki.lan> (raw)
In-Reply-To: <20241031094927.GB995052@pevik>
Hi!
> I was comparing the old include/lapi/syscalls.h (21579 lines) and the new one
> (20054). Having new file shorter is a bit surprising to me. I haven't found what
> is missing, probably I'm missing something myself :).
That is strange, I got exactly same content minus some whitespaces and
slightly different macros that check for arch support:
--- syscalls.h.old 2024-10-31 11:17:04.840217056 +0100
+++ syscalls.h 2024-10-31 11:23:38.326891830 +0100
@@ -1,3 +1,5 @@
+
+// SPDX-License-Identifier: GPL-2.0-or-later
/************************************************
* GENERATED FILE: DO NOT EDIT/PATCH THIS FILE *
* change your arch specific .in file instead *
@@ -6,8 +8,6 @@
/*
* Here we stick all the ugly *fallback* logic for linux
* system call numbers (those __NR_ thingies).
- *
- * Licensed under the GPLv2 or later, see the COPYING file.
*/
#ifndef LAPI_SYSCALLS_H__
@@ -19,30 +19,30 @@
#ifdef TST_TEST_H__
#define TST_SYSCALL_BRK__(NR, SNR) ({ \
- tst_brk(TCONF, \
- "syscall(%d) " SNR " not supported on your arch", NR); \
+tst_brk(TCONF, \
+ "syscall(%d) " SNR " not supported on your arch", NR); \
})
#else
inline static void dummy_cleanup(void) {}
#define TST_SYSCALL_BRK__(NR, SNR) ({ \
- tst_brkm(TCONF, dummy_cleanup, \
- "syscall(%d) " SNR " not supported on your arch", NR); \
+tst_brkm(TCONF, dummy_cleanup, \
+ "syscall(%d) " SNR " not supported on your arch", NR); \
})
#endif
#define tst_syscall(NR, ...) ({ \
- intptr_t tst_ret; \
- if (NR == __LTP__NR_INVALID_SYSCALL) { \
- errno = ENOSYS; \
- tst_ret = -1; \
- } else { \
- tst_ret = syscall(NR, ##__VA_ARGS__); \
- } \
- if (tst_ret == -1 && errno == ENOSYS) { \
- TST_SYSCALL_BRK__(NR, #NR); \
- } \
- tst_ret; \
+intptr_t tst_ret; \
+if (NR == __LTP__NR_INVALID_SYSCALL) { \
+ errno = ENOSYS; \
+ tst_ret = -1; \
+} else { \
+ tst_ret = syscall(NR, ##__VA_ARGS__); \
+} \
+if (tst_ret == -1 && errno == ENOSYS) { \
+ TST_SYSCALL_BRK__(NR, #NR); \
+} \
+tst_ret; \
})
#define __LTP__NR_INVALID_SYSCALL -1
@@ -6681,7 +6681,7 @@
#endif
-#if defined(__mips__) && defined(_ABIN32)
+#ifdef __mips_n32__
# ifndef __NR_read
# define __NR_read 6000
# endif
@@ -7828,7 +7828,7 @@
#endif
-#if defined(__mips__) && defined(_ABI64)
+#ifdef __mips_n64__
# ifndef __NR_read
# define __NR_read 5000
# endif
@@ -8903,7 +8903,7 @@
#endif
-#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32
+#ifdef __mips_o32__
# ifndef __NR_syscall
# define __NR_syscall 4000
# endif
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-10-31 10:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 7:27 [LTP] [PATCH v6 0/3] Automatically generate syscalls.h Andrea Cervesato
2024-10-31 7:27 ` [LTP] [PATCH v6 1/3] Refactor regen.sh script to generate syscalls Andrea Cervesato
2024-10-31 9:49 ` Petr Vorel
2024-10-31 10:28 ` Cyril Hrubis [this message]
2024-10-31 10:37 ` Andrea Cervesato via ltp
2024-10-31 11:35 ` Cyril Hrubis
2024-10-31 11:02 ` Andrea Cervesato via ltp
2024-10-31 11:17 ` Petr Vorel
2024-10-31 12:19 ` Cyril Hrubis
2024-10-31 12:25 ` Andrea Cervesato via ltp
2024-10-31 10:25 ` Cyril Hrubis
2024-10-31 10:31 ` Cyril Hrubis
2024-10-31 7:27 ` [LTP] [PATCH v6 2/3] Add script to generate arch(s) dependant syscalls Andrea Cervesato
2024-10-31 7:27 ` [LTP] [PATCH v6 3/3] Delete obsolete strip_syscall.awk file Andrea Cervesato
2024-10-31 9:56 ` [LTP] [PATCH v6 0/3] Automatically generate syscalls.h Petr Vorel
2024-10-31 10:02 ` 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=ZyNbzFs39LOOLgV7@yuki.lan \
--to=chrubis@suse.cz \
--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.