- v5.9 -> v5.10.
This commit is contained in:
Dmitry V. Levin 2020-12-14 08:06:59 +00:00
parent a2e76d2cbe
commit 58f60c2782
7 changed files with 9 additions and 919 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/strace-5.9.tar.xz
/strace-5.10.tar.xz

View File

@ -1,52 +0,0 @@
Index: strace-5.9/tests/stack-fcall-0.c
===================================================================
--- strace-5.9.orig/tests/stack-fcall-0.c 2020-08-03 10:00:00.000000000 +0200
+++ strace-5.9/tests/stack-fcall-0.c 2020-10-06 11:12:07.163673799 +0200
@@ -7,7 +7,7 @@
#include "stack-fcall.h"
-int
+int __attribute__ ((noinline))
f0(int i, unsigned long f)
{
f ^= (unsigned long) (void *) f0;
Index: strace-5.9/tests/stack-fcall-1.c
===================================================================
--- strace-5.9.orig/tests/stack-fcall-1.c 2020-08-03 10:00:00.000000000 +0200
+++ strace-5.9/tests/stack-fcall-1.c 2020-10-06 11:12:15.875605255 +0200
@@ -7,7 +7,7 @@
#include "stack-fcall.h"
-int
+int __attribute__ ((noinline))
f1(int i, unsigned long f)
{
f ^= (unsigned long) (void *) f1;
Index: strace-5.9/tests/stack-fcall-2.c
===================================================================
--- strace-5.9.orig/tests/stack-fcall-2.c 2020-08-03 10:00:00.000000000 +0200
+++ strace-5.9/tests/stack-fcall-2.c 2020-10-06 11:12:22.700551557 +0200
@@ -7,7 +7,7 @@
#include "stack-fcall.h"
-int
+int __attribute__ ((noinline))
f2(int i, unsigned long f)
{
f ^= (unsigned long) (void *) f2;
Index: strace-5.9/tests/stack-fcall-3.c
===================================================================
--- strace-5.9.orig/tests/stack-fcall-3.c 2020-08-03 10:00:00.000000000 +0200
+++ strace-5.9/tests/stack-fcall-3.c 2020-10-06 11:12:32.556474012 +0200
@@ -8,7 +8,7 @@
#include <signal.h>
#include "stack-fcall.h"
-int
+int __attribute__ ((noinline))
f3(int i, unsigned long f)
{
f ^= (unsigned long) (void *) f3;

View File

@ -1,147 +0,0 @@
Index: strace-5.9/configure
===================================================================
--- strace-5.9.orig/configure 2020-09-24 11:18:58.000000000 +0200
+++ strace-5.9/configure 2020-10-06 19:49:07.708680050 +0200
@@ -678,6 +678,8 @@
clock_LIBS
timer_LIBS
dl_LIBS
+KERNEL_LONG_T_32_BIT_FALSE
+KERNEL_LONG_T_32_BIT_TRUE
SIZEOF_KERNEL_LONG_T
SIZEOF_LONG
ac_ct_AR
@@ -21947,6 +21949,14 @@
SIZEOF_KERNEL_LONG_T="$ac_cv_sizeof_kernel_long_t"
+ if test x$SIZEOF_KERNEL_LONG_T == x4; then
+ KERNEL_LONG_T_32_BIT_TRUE=
+ KERNEL_LONG_T_32_BIT_FALSE='#'
+else
+ KERNEL_LONG_T_32_BIT_TRUE='#'
+ KERNEL_LONG_T_32_BIT_FALSE=
+fi
+
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@@ -25039,6 +25049,10 @@
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${KERNEL_LONG_T_32_BIT_TRUE}" && test -z "${KERNEL_LONG_T_32_BIT_FALSE}"; then
+ as_fn_error $? "conditional \"KERNEL_LONG_T_32_BIT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${ENABLE_STACKTRACE_TRUE}" && test -z "${ENABLE_STACKTRACE_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_STACKTRACE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Index: strace-5.9/tests-m32/Makefile.in
===================================================================
--- strace-5.9.orig/tests-m32/Makefile.in 2020-10-06 09:48:41.416722064 +0200
+++ strace-5.9/tests-m32/Makefile.in 2020-10-22 04:35:05.329982236 +0200
@@ -6780,10 +6780,30 @@
umovestr_cached.test \
# end of MISC_TESTS
+
+# A temporary workaround for glibc commits
+# 9ebaabeaac1a96b0d91f52902ce1dbf4f5a562dd
+# be9b0b9a012780a403a266c90878efffb9a5f3ca
+# a16d2abd496bd974a88207d5599265aae5ae4880
+TIME64_XFAIL = \
+ ipc_msg.gen.test \
+ ipc_msg-Xabbrev.gen.test \
+ ipc_msg-Xraw.gen.test \
+ ipc_msg-Xverbose.gen.test \
+ ipc_sem.gen.test \
+ ipc_sem-Xabbrev.gen.test \
+ ipc_sem-Xraw.gen.test \
+ ipc_sem-Xverbose.gen.test \
+ ipc_shm.gen.test \
+ ipc_shm-Xabbrev.gen.test \
+ ipc_shm-Xraw.gen.test \
+ ipc_shm-Xverbose.gen.test \
+ # end of TIME64_XFAIL
+
XFAIL_TESTS_ =
XFAIL_TESTS_m32 = $(STACKTRACE_TESTS)
XFAIL_TESTS_mx32 = $(STACKTRACE_TESTS)
-XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
+XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH)) $(TIME64_XFAIL)
TEST_LOG_COMPILER = env
AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
Index: strace-5.9/tests-mx32/Makefile.in
===================================================================
--- strace-5.9.orig/tests-mx32/Makefile.in 2020-10-06 09:48:47.323672772 +0200
+++ strace-5.9/tests-mx32/Makefile.in 2020-10-22 04:35:09.438944519 +0200
@@ -6780,10 +6780,30 @@
umovestr_cached.test \
# end of MISC_TESTS
+
+# A temporary workaround for glibc commits
+# 9ebaabeaac1a96b0d91f52902ce1dbf4f5a562dd
+# be9b0b9a012780a403a266c90878efffb9a5f3ca
+# a16d2abd496bd974a88207d5599265aae5ae4880
+TIME64_XFAIL = \
+ ipc_msg.gen.test \
+ ipc_msg-Xabbrev.gen.test \
+ ipc_msg-Xraw.gen.test \
+ ipc_msg-Xverbose.gen.test \
+ ipc_sem.gen.test \
+ ipc_sem-Xabbrev.gen.test \
+ ipc_sem-Xraw.gen.test \
+ ipc_sem-Xverbose.gen.test \
+ ipc_shm.gen.test \
+ ipc_shm-Xabbrev.gen.test \
+ ipc_shm-Xraw.gen.test \
+ ipc_shm-Xverbose.gen.test \
+ # end of TIME64_XFAIL
+
XFAIL_TESTS_ =
XFAIL_TESTS_m32 = $(STACKTRACE_TESTS)
XFAIL_TESTS_mx32 = $(STACKTRACE_TESTS)
-XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
+XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH)) $(TIME64_XFAIL)
TEST_LOG_COMPILER = env
AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \
Index: strace-5.9/tests/Makefile.in
===================================================================
--- strace-5.9.orig/tests/Makefile.in 2020-10-06 09:47:53.610143253 +0200
+++ strace-5.9/tests/Makefile.in 2020-10-22 04:35:00.113030124 +0200
@@ -6780,10 +6780,30 @@
umovestr_cached.test \
# end of MISC_TESTS
+
+# A temporary workaround for glibc commits
+# 9ebaabeaac1a96b0d91f52902ce1dbf4f5a562dd
+# be9b0b9a012780a403a266c90878efffb9a5f3ca
+# a16d2abd496bd974a88207d5599265aae5ae4880
+TIME64_XFAIL = \
+ ipc_msg.gen.test \
+ ipc_msg-Xabbrev.gen.test \
+ ipc_msg-Xraw.gen.test \
+ ipc_msg-Xverbose.gen.test \
+ ipc_sem.gen.test \
+ ipc_sem-Xabbrev.gen.test \
+ ipc_sem-Xraw.gen.test \
+ ipc_sem-Xverbose.gen.test \
+ ipc_shm.gen.test \
+ ipc_shm-Xabbrev.gen.test \
+ ipc_shm-Xraw.gen.test \
+ ipc_shm-Xverbose.gen.test \
+ # end of TIME64_XFAIL
+
XFAIL_TESTS_ =
XFAIL_TESTS_m32 = $(STACKTRACE_TESTS)
XFAIL_TESTS_mx32 = $(STACKTRACE_TESTS)
-XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH))
+XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) $(XFAIL_TESTS_$(ARCH)) $(TIME64_XFAIL)
TEST_LOG_COMPILER = env
AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) STRACE_NATIVE_ARCH=$(NATIVE_ARCH) \
SIZEOF_KERNEL_LONG_T=$(SIZEOF_KERNEL_LONG_T) \

View File

@ -1,447 +0,0 @@
From 4f0128be251d56feadad25961d92032fd0ca1e35 Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Wed, 21 Oct 2020 20:43:21 +0200
Subject: [PATCH 3/4] tests: update semtimedop test
---
tests/semtimedop.c | 60 +++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 44 insertions(+), 16 deletions(-)
Index: strace-5.9/tests/semtimedop.c
===================================================================
--- strace-5.9.orig/tests/semtimedop.c 2020-09-23 18:29:35.000000000 +0200
+++ strace-5.9/tests/semtimedop.c 2020-10-22 04:36:35.871151141 +0200
@@ -8,7 +8,7 @@
#include "tests.h"
#include "scno.h"
-#if defined __NR_semtimedop || defined __NR_socketcall
+#if defined __NR_semtimedop || defined __NR_ipc
# include <sys/ipc.h>
# include <sys/sem.h>
@@ -21,6 +21,34 @@
# include "xlat/semop_flags.h"
# undef XLAT_MACROS_ONLY
+long
+call_semtimedop(int semid, struct sembuf *semops, size_t nsops, struct timespec *timeout)
+{
+ static const kernel_ulong_t semid_fill = (kernel_ulong_t) -1 - (unsigned int) -1;
+ static const kernel_ulong_t nsops_fill = (kernel_ulong_t) -1 - (size_t) -1;
+
+# ifdef __NR_semtimedop
+ return syscall(__NR_semtimedop,
+ semid_fill | (unsigned int) semid,
+ f8ill_ptr_to_kulong(semops),
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout));
+# elif defined __s390x__ || defined __s390__
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout),
+ f8ill_ptr_to_kulong(semops));
+# else
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ 0,
+ f8ill_ptr_to_kulong(semops),
+ f8ill_ptr_to_kulong(timeout));
+# endif
+}
+
union semun {
int val;
struct semid_ds *buf;
@@ -59,11 +87,11 @@
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b);
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b2);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(bogus_semid, bogus_sops, 1, NULL);
+ rc = call_semtimedop(bogus_semid, bogus_sops, 1, NULL);
printf("semtimedop(%d, %p, %u, NULL) = %s\n",
bogus_semid, bogus_sops, 1, sprintrc(rc));
@@ -75,7 +103,7 @@
sem_b2->sem_op = 0xf00d;
sem_b2->sem_flg = 0xbeef;
- rc = semtimedop(bogus_semid, sem_b2, 2, NULL);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, NULL);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", NULL) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -84,26 +112,26 @@
(short) (sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT)),
sem_b2 + 1, 2, sprintrc(rc));
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, 1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, 1");*/
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, -1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, -1");*/
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, NULL) = 0\n", id);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(id, sem_b + 1, 1, ts + 1);
+ rc = call_semtimedop(id, sem_b + 1, 1, ts + 1);
printf("semtimedop(%d, %p, 1, %p) = %s\n",
id, sem_b + 1, ts + 1, sprintrc(rc));
ts->tv_sec = 1;
ts->tv_nsec = 123456789;
- rc = semtimedop(bogus_semid, sem_b2, 2, ts);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, ts);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -115,12 +143,12 @@
sprintrc(rc));
sem_b->sem_op = 1;
- if (semtimedop(id, sem_b, 1, NULL))
+ if (call_semtimedop(id, sem_b, 1, NULL))
perror_msg_and_skip("semtimedop, 1");
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, ts))
+ if (call_semtimedop(id, sem_b, 1, ts))
perror_msg_and_skip("semtimedop, -1");
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = 0\n", id,
@@ -129,7 +157,7 @@
sem_b->sem_op = 1;
ts->tv_sec = 0xdeadbeefU;
ts->tv_nsec = 0xfacefeedU;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -138,7 +166,7 @@
sem_b->sem_op = -1;
ts->tv_sec = (time_t) 0xcafef00ddeadbeefLL;
ts->tv_nsec = (long) 0xbadc0dedfacefeedLL;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -150,6 +178,6 @@
#else
-SKIP_MAIN_UNDEFINED("__NR_semtimedop || __NR_socketcall")
+SKIP_MAIN_UNDEFINED("__NR_call_semtimedop || __NR_ipc")
#endif
Index: strace-5.9/tests-m32/semtimedop.c
===================================================================
--- strace-5.9.orig/tests-m32/semtimedop.c 2020-09-23 18:29:35.000000000 +0200
+++ strace-5.9/tests-m32/semtimedop.c 2020-10-22 04:36:55.406971818 +0200
@@ -8,7 +8,7 @@
#include "tests.h"
#include "scno.h"
-#if defined __NR_semtimedop || defined __NR_socketcall
+#if defined __NR_semtimedop || defined __NR_ipc
# include <sys/ipc.h>
# include <sys/sem.h>
@@ -21,6 +21,34 @@
# include "xlat/semop_flags.h"
# undef XLAT_MACROS_ONLY
+long
+call_semtimedop(int semid, struct sembuf *semops, size_t nsops, struct timespec *timeout)
+{
+ static const kernel_ulong_t semid_fill = (kernel_ulong_t) -1 - (unsigned int) -1;
+ static const kernel_ulong_t nsops_fill = (kernel_ulong_t) -1 - (size_t) -1;
+
+# ifdef __NR_semtimedop
+ return syscall(__NR_semtimedop,
+ semid_fill | (unsigned int) semid,
+ f8ill_ptr_to_kulong(semops),
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout));
+# elif defined __s390x__ || defined __s390__
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout),
+ f8ill_ptr_to_kulong(semops));
+# else
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ 0,
+ f8ill_ptr_to_kulong(semops),
+ f8ill_ptr_to_kulong(timeout));
+# endif
+}
+
union semun {
int val;
struct semid_ds *buf;
@@ -59,11 +87,11 @@
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b);
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b2);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(bogus_semid, bogus_sops, 1, NULL);
+ rc = call_semtimedop(bogus_semid, bogus_sops, 1, NULL);
printf("semtimedop(%d, %p, %u, NULL) = %s\n",
bogus_semid, bogus_sops, 1, sprintrc(rc));
@@ -75,7 +103,7 @@
sem_b2->sem_op = 0xf00d;
sem_b2->sem_flg = 0xbeef;
- rc = semtimedop(bogus_semid, sem_b2, 2, NULL);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, NULL);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", NULL) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -84,26 +112,26 @@
(short) (sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT)),
sem_b2 + 1, 2, sprintrc(rc));
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, 1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, 1");*/
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, -1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, -1");*/
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, NULL) = 0\n", id);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(id, sem_b + 1, 1, ts + 1);
+ rc = call_semtimedop(id, sem_b + 1, 1, ts + 1);
printf("semtimedop(%d, %p, 1, %p) = %s\n",
id, sem_b + 1, ts + 1, sprintrc(rc));
ts->tv_sec = 1;
ts->tv_nsec = 123456789;
- rc = semtimedop(bogus_semid, sem_b2, 2, ts);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, ts);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -115,12 +143,12 @@
sprintrc(rc));
sem_b->sem_op = 1;
- if (semtimedop(id, sem_b, 1, NULL))
+ if (call_semtimedop(id, sem_b, 1, NULL))
perror_msg_and_skip("semtimedop, 1");
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, ts))
+ if (call_semtimedop(id, sem_b, 1, ts))
perror_msg_and_skip("semtimedop, -1");
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = 0\n", id,
@@ -129,7 +157,7 @@
sem_b->sem_op = 1;
ts->tv_sec = 0xdeadbeefU;
ts->tv_nsec = 0xfacefeedU;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -138,7 +166,7 @@
sem_b->sem_op = -1;
ts->tv_sec = (time_t) 0xcafef00ddeadbeefLL;
ts->tv_nsec = (long) 0xbadc0dedfacefeedLL;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -150,6 +178,6 @@
#else
-SKIP_MAIN_UNDEFINED("__NR_semtimedop || __NR_socketcall")
+SKIP_MAIN_UNDEFINED("__NR_call_semtimedop || __NR_ipc")
#endif
Index: strace-5.9/tests-mx32/semtimedop.c
===================================================================
--- strace-5.9.orig/tests-mx32/semtimedop.c 2020-09-23 18:29:35.000000000 +0200
+++ strace-5.9/tests-mx32/semtimedop.c 2020-10-22 04:36:57.654951183 +0200
@@ -8,7 +8,7 @@
#include "tests.h"
#include "scno.h"
-#if defined __NR_semtimedop || defined __NR_socketcall
+#if defined __NR_semtimedop || defined __NR_ipc
# include <sys/ipc.h>
# include <sys/sem.h>
@@ -21,6 +21,34 @@
# include "xlat/semop_flags.h"
# undef XLAT_MACROS_ONLY
+long
+call_semtimedop(int semid, struct sembuf *semops, size_t nsops, struct timespec *timeout)
+{
+ static const kernel_ulong_t semid_fill = (kernel_ulong_t) -1 - (unsigned int) -1;
+ static const kernel_ulong_t nsops_fill = (kernel_ulong_t) -1 - (size_t) -1;
+
+# ifdef __NR_semtimedop
+ return syscall(__NR_semtimedop,
+ semid_fill | (unsigned int) semid,
+ f8ill_ptr_to_kulong(semops),
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout));
+# elif defined __s390x__ || defined __s390__
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ f8ill_ptr_to_kulong(timeout),
+ f8ill_ptr_to_kulong(semops));
+# else
+ return syscall(__NR_ipc, 4 /* SEMTIMEDOP */,
+ semid_fill | (unsigned int) semid,
+ nsops_fill | nsops,
+ 0,
+ f8ill_ptr_to_kulong(semops),
+ f8ill_ptr_to_kulong(timeout));
+# endif
+}
+
union semun {
int val;
struct semid_ds *buf;
@@ -59,11 +87,11 @@
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b);
TAIL_ALLOC_OBJECT_CONST_PTR(struct sembuf, sem_b2);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(bogus_semid, bogus_sops, 1, NULL);
+ rc = call_semtimedop(bogus_semid, bogus_sops, 1, NULL);
printf("semtimedop(%d, %p, %u, NULL) = %s\n",
bogus_semid, bogus_sops, 1, sprintrc(rc));
@@ -75,7 +103,7 @@
sem_b2->sem_op = 0xf00d;
sem_b2->sem_flg = 0xbeef;
- rc = semtimedop(bogus_semid, sem_b2, 2, NULL);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, NULL);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", NULL) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -84,26 +112,26 @@
(short) (sem_b2->sem_flg & ~(SEM_UNDO | IPC_NOWAIT)),
sem_b2 + 1, 2, sprintrc(rc));
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, 1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, 1");*/
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, NULL))
- perror_msg_and_skip("semtimedop, -1");
+ if (call_semtimedop(id, sem_b, 1, NULL))
+ {} /*perror_msg_and_skip("semtimedop, -1");*/
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1, NULL) = 0\n", id);
- rc = semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
+ rc = call_semtimedop(bogus_semid, NULL, bogus_nsops, NULL);
printf("semtimedop(%d, NULL, %u, NULL) = %s\n",
bogus_semid, (unsigned) bogus_nsops, sprintrc(rc));
- rc = semtimedop(id, sem_b + 1, 1, ts + 1);
+ rc = call_semtimedop(id, sem_b + 1, 1, ts + 1);
printf("semtimedop(%d, %p, 1, %p) = %s\n",
id, sem_b + 1, ts + 1, sprintrc(rc));
ts->tv_sec = 1;
ts->tv_nsec = 123456789;
- rc = semtimedop(bogus_semid, sem_b2, 2, ts);
+ rc = call_semtimedop(bogus_semid, sem_b2, 2, ts);
printf("semtimedop(%d, [{%hu, %hd, %s%s%#hx}, ... /* %p */], %u"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
bogus_semid, sem_b2->sem_num, sem_b2->sem_op,
@@ -115,12 +143,12 @@
sprintrc(rc));
sem_b->sem_op = 1;
- if (semtimedop(id, sem_b, 1, NULL))
+ if (call_semtimedop(id, sem_b, 1, NULL))
perror_msg_and_skip("semtimedop, 1");
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1, NULL) = 0\n", id);
sem_b->sem_op = -1;
- if (semtimedop(id, sem_b, 1, ts))
+ if (call_semtimedop(id, sem_b, 1, ts))
perror_msg_and_skip("semtimedop, -1");
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = 0\n", id,
@@ -129,7 +157,7 @@
sem_b->sem_op = 1;
ts->tv_sec = 0xdeadbeefU;
ts->tv_nsec = 0xfacefeedU;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, 1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -138,7 +166,7 @@
sem_b->sem_op = -1;
ts->tv_sec = (time_t) 0xcafef00ddeadbeefLL;
ts->tv_nsec = (long) 0xbadc0dedfacefeedLL;
- rc = semtimedop(id, sem_b, 1, ts);
+ rc = call_semtimedop(id, sem_b, 1, ts);
printf("semtimedop(%d, [{0, -1, SEM_UNDO}], 1"
", {tv_sec=%lld, tv_nsec=%llu}) = %s\n",
id, (long long) ts->tv_sec,
@@ -150,6 +178,6 @@
#else
-SKIP_MAIN_UNDEFINED("__NR_semtimedop || __NR_socketcall")
+SKIP_MAIN_UNDEFINED("__NR_call_semtimedop || __NR_ipc")
#endif

View File

@ -1,255 +0,0 @@
From 5cefe1876579dc0669bbd5490eed26d00e281c18 Mon Sep 17 00:00:00 2001
From: Eugene Syromyatnikov <evgsyr@gmail.com>
Date: Thu, 22 Oct 2020 04:28:31 +0200
Subject: [PATCH 4/4] tests: add own pselect6 syscall wrapper to the test
---
tests/pselect6.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
Index: strace-5.9/tests/pselect6.c
===================================================================
--- strace-5.9.orig/tests/pselect6.c 2019-09-25 03:02:03.000000000 +0200
+++ strace-5.9/tests/pselect6.c 2020-10-22 04:37:09.583841685 +0200
@@ -28,6 +28,23 @@
{
}
+static long
+pselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ const struct timespec *timeout, const sigset_t *sigmask)
+{
+ struct {
+ kernel_ulong_t ss;
+ kernel_ulong_t ss_len;
+ } data = { .ss = (uintptr_t) sigmask, .ss_len = NSIG_BYTES };
+ struct timespec ts;
+
+ if (timeout)
+ ts = *timeout;
+
+ return syscall(__NR_pselect6, nfds, readfds, writefds, exceptfds,
+ timeout ? &ts : NULL, &data);
+}
+
int main(int ac, char **av)
{
int fds[2];
@@ -58,7 +75,7 @@
FD_SET(fds[1], set[1]);
FD_SET(1, set[2]);
FD_SET(2, set[2]);
- int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
+ int rc = pselect6(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
if (rc < 0)
perror_msg_and_skip("pselect");
assert(rc == 1);
@@ -90,7 +107,7 @@
*/
FD_ZERO(set[0]);
FD_SET(fds[1], set[0]);
- assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1);
+ assert(pselect6(-1, NULL, set[0], NULL, NULL, &mask) == -1);
printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) "
"= -1 EINVAL (%m)\n", set[0], NSIG_BYTES);
@@ -102,7 +119,7 @@
FD_ZERO(set[1]);
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 123;
- assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
+ assert(pselect6(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}"
", {[HUP CHLD], %u}) = 0 (Timeout)\n",
FD_SETSIZE + 1, fds[0], NSIG_BYTES);
@@ -112,7 +129,7 @@
*/
tm.ts.tv_sec = 0xdeadbeefU;
tm.ts.tv_nsec = 0xfacefeedU;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -121,7 +138,7 @@
tm.ts.tv_sec = (time_t) 0xcafef00ddeadbeefLL;
tm.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -133,7 +150,7 @@
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 222222222;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}"
", {[HUP CHLD], %u})"
" = ? ERESTARTNOHAND (To be restarted if no handler)\n",
Index: strace-5.9/tests-m32/pselect6.c
===================================================================
--- strace-5.9.orig/tests-m32/pselect6.c 2019-09-25 03:02:03.000000000 +0200
+++ strace-5.9/tests-m32/pselect6.c 2020-10-22 04:37:31.789637854 +0200
@@ -28,6 +28,23 @@
{
}
+static long
+pselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ const struct timespec *timeout, const sigset_t *sigmask)
+{
+ struct {
+ kernel_ulong_t ss;
+ kernel_ulong_t ss_len;
+ } data = { .ss = (uintptr_t) sigmask, .ss_len = NSIG_BYTES };
+ struct timespec ts;
+
+ if (timeout)
+ ts = *timeout;
+
+ return syscall(__NR_pselect6, nfds, readfds, writefds, exceptfds,
+ timeout ? &ts : NULL, &data);
+}
+
int main(int ac, char **av)
{
int fds[2];
@@ -58,7 +75,7 @@
FD_SET(fds[1], set[1]);
FD_SET(1, set[2]);
FD_SET(2, set[2]);
- int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
+ int rc = pselect6(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
if (rc < 0)
perror_msg_and_skip("pselect");
assert(rc == 1);
@@ -90,7 +107,7 @@
*/
FD_ZERO(set[0]);
FD_SET(fds[1], set[0]);
- assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1);
+ assert(pselect6(-1, NULL, set[0], NULL, NULL, &mask) == -1);
printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) "
"= -1 EINVAL (%m)\n", set[0], NSIG_BYTES);
@@ -102,7 +119,7 @@
FD_ZERO(set[1]);
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 123;
- assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
+ assert(pselect6(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}"
", {[HUP CHLD], %u}) = 0 (Timeout)\n",
FD_SETSIZE + 1, fds[0], NSIG_BYTES);
@@ -112,7 +129,7 @@
*/
tm.ts.tv_sec = 0xdeadbeefU;
tm.ts.tv_nsec = 0xfacefeedU;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -121,7 +138,7 @@
tm.ts.tv_sec = (time_t) 0xcafef00ddeadbeefLL;
tm.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -133,7 +150,7 @@
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 222222222;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}"
", {[HUP CHLD], %u})"
" = ? ERESTARTNOHAND (To be restarted if no handler)\n",
Index: strace-5.9/tests-mx32/pselect6.c
===================================================================
--- strace-5.9.orig/tests-mx32/pselect6.c 2019-09-25 03:02:03.000000000 +0200
+++ strace-5.9/tests-mx32/pselect6.c 2020-10-22 04:37:34.579612244 +0200
@@ -28,6 +28,23 @@
{
}
+static long
+pselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ const struct timespec *timeout, const sigset_t *sigmask)
+{
+ struct {
+ kernel_ulong_t ss;
+ kernel_ulong_t ss_len;
+ } data = { .ss = (uintptr_t) sigmask, .ss_len = NSIG_BYTES };
+ struct timespec ts;
+
+ if (timeout)
+ ts = *timeout;
+
+ return syscall(__NR_pselect6, nfds, readfds, writefds, exceptfds,
+ timeout ? &ts : NULL, &data);
+}
+
int main(int ac, char **av)
{
int fds[2];
@@ -58,7 +75,7 @@
FD_SET(fds[1], set[1]);
FD_SET(1, set[2]);
FD_SET(2, set[2]);
- int rc = pselect(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
+ int rc = pselect6(fds[1] + 1, set[0], set[1], set[2], NULL, NULL);
if (rc < 0)
perror_msg_and_skip("pselect");
assert(rc == 1);
@@ -90,7 +107,7 @@
*/
FD_ZERO(set[0]);
FD_SET(fds[1], set[0]);
- assert(pselect(-1, NULL, set[0], NULL, NULL, &mask) == -1);
+ assert(pselect6(-1, NULL, set[0], NULL, NULL, &mask) == -1);
printf("pselect6(-1, NULL, %p, NULL, NULL, {[HUP CHLD], %u}) "
"= -1 EINVAL (%m)\n", set[0], NSIG_BYTES);
@@ -102,7 +119,7 @@
FD_ZERO(set[1]);
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 123;
- assert(pselect(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
+ assert(pselect6(FD_SETSIZE + 1, set[0], set[1], NULL, &tm.ts, &mask) == 0);
printf("pselect6(%d, [%d], [], NULL, {tv_sec=0, tv_nsec=123}"
", {[HUP CHLD], %u}) = 0 (Timeout)\n",
FD_SETSIZE + 1, fds[0], NSIG_BYTES);
@@ -112,7 +129,7 @@
*/
tm.ts.tv_sec = 0xdeadbeefU;
tm.ts.tv_nsec = 0xfacefeedU;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -121,7 +138,7 @@
tm.ts.tv_sec = (time_t) 0xcafef00ddeadbeefLL;
tm.ts.tv_nsec = (long) 0xbadc0dedfacefeedLL;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, NULL) == -1);
printf("pselect6(0, NULL, NULL, NULL"
", {tv_sec=%lld, tv_nsec=%llu}, {NULL, %u}) = %s\n",
(long long) tm.ts.tv_sec,
@@ -133,7 +150,7 @@
tm.ts.tv_sec = 0;
tm.ts.tv_nsec = 222222222;
- assert(pselect(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
+ assert(pselect6(0, NULL, NULL, NULL, &tm.ts, &mask) == -1);
printf("pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=222222222}"
", {[HUP CHLD], %u})"
" = ? ERESTARTNOHAND (To be restarted if no handler)\n",

View File

@ -1 +1 @@
SHA512 (strace-5.9.tar.xz) = f28d5dcceccb44557b39ed6f295f3250662804dc3ad79959bfadffcecc9b736e532c7c90dc89ebf9d07eb3e02a5ace231605851148ca09d41c8c60dc1ff68206
SHA512 (strace-5.10.tar.xz) = 1baa41b6d52f2e40e42a22850beee1ae278fafe712796694631898f06a7540d8f2c3fa70807e0062734f0976ebbd0824457c733ccda248f017c218387366ed48

View File

@ -1,7 +1,7 @@
Summary: Tracks and displays system calls associated with a running process
Name: strace
Version: 5.9
Release: 2%{?dist}
Version: 5.10
Release: 1%{?dist}
# The test suite is GPLv2+, all the rest is LGPLv2.1+.
License: LGPL-2.1+ and GPL-2.0+
# Some distros require Group tag to be present,
@ -14,10 +14,6 @@ Group: Development%{?suse_version:/Tools}/Debuggers
URL: https://strace.io
%if 0%{?fedora} >= 12 || 0%{?centos} >= 6 || 0%{?rhel} >= 6 || 0%{?suse_version} >= 1200
Source: https://strace.io/files/%{version}/strace-%{version}.tar.xz
Patch1: 0001-noinline.patch
Patch2: 0002-ipc-xfail.patch
Patch3: 0003-tests-update-semtimedop-test.patch
Patch4: 0004-tests-add-own-pselect6-syscall-wrapper-to-the-test.patch
BuildRequires: xz
%else
Source: strace-%{version}.tar.gz
@ -61,13 +57,9 @@ received by a process.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
echo -n %version-%release > .tarball-version
echo -n 2020 > .year
echo -n 2020-09-23 > .strace.1.in.date
echo -n 2020-11-29 > .strace.1.in.date
%build
echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION'
@ -114,12 +106,11 @@ echo 'END OF TEST SUITE INFORMATION'
%{_mandir}/man1/*
%changelog
* Wed Oct 21 2020 Eugene Syromyatnikov <esyr@redhat.com> - 5.9-2
- Mark even more tests as XFAIL so the build succeedes
(references: #1886468, #1886480).
* Mon Dec 14 2020 Dmitry V. Levin <ldv@altlinux.org> - 5.10-1
- v5.9 -> v5.10.
* Mon Oct 05 2020 Eugene Syromyatnikov <esyr@redhat.com> - 5.9-1
- v5.8 -> v5.9 (resolves: #1035433).
* Thu Sep 24 2020 Dmitry V. Levin <ldv@altlinux.org> - 5.9-1
- v5.8 -> v5.9.
* Thu Aug 06 2020 Dmitry V. Levin <ldv@altlinux.org> - 5.8-1
- v5.7 -> v5.8.