From: zhanglianjie <zhanglianjie@uniontech.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] stime: Only o32 system calls require 32-bit programs on mips
Date: Tue, 20 Jul 2021 16:37:08 +0800 [thread overview]
Message-ID: <20210720083708.13281-1-zhanglianjie@uniontech.com> (raw)
The stime() system call is only o32, not n32 and n64. If you do not
specify that the current program is compiled to 32-bit when compiling
the program on mips, the stime() system call will fail when the
program is running.
Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
---
testcases/kernel/syscalls/stime/stime_var.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testcases/kernel/syscalls/stime/stime_var.h b/testcases/kernel/syscalls/stime/stime_var.h
index 708b80573..c5bafac99 100644
--- a/testcases/kernel/syscalls/stime/stime_var.h
+++ b/testcases/kernel/syscalls/stime/stime_var.h
@@ -25,7 +25,11 @@ static int do_stime(time_t *ntime)
#endif
break;
case 1:
+#if !defined(__mips__) || _MIPS_SZLONG == 32
return tst_syscall(__NR_stime, ntime);
+#else
+ tst_brk(TCONF, "the stime() syscall only o32 ABI in mips, make sure the current program is 32-bit");
+#endif
case 2: {
struct __kernel_old_timeval tv;
--
2.20.1
next reply other threads:[~2021-07-20 8:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 8:37 zhanglianjie [this message]
2021-07-21 14:15 ` [LTP] [PATCH v2] stime: Only o32 system calls require 32-bit programs on mips Petr Vorel
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=20210720083708.13281-1-zhanglianjie@uniontech.com \
--to=zhanglianjie@uniontech.com \
--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.