Accepting request 569531 from home:jirislaby:branches:devel:tools
- add update-futex-test-in-accordance-with-kernel-s-v4.15-.patch OBS-URL: https://build.opensuse.org/request/show/569531 OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=81
This commit is contained in:
parent
08dbdf8655
commit
f8063c7aca
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 25 15:04:49 UTC 2018 - jslaby@suse.com
|
||||||
|
|
||||||
|
- add update-futex-test-in-accordance-with-kernel-s-v4.15-.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 14 17:30:50 UTC 2017 - schwab@linux-m68k.org
|
Tue Nov 14 17:30:50 UTC 2017 - schwab@linux-m68k.org
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ Source: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.x
|
|||||||
Source2: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz.asc
|
Source2: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.xz.asc
|
||||||
Source3: %{name}.keyring
|
Source3: %{name}.keyring
|
||||||
Source4: baselibs.conf
|
Source4: baselibs.conf
|
||||||
|
Patch0: update-futex-test-in-accordance-with-kernel-s-v4.15-.patch
|
||||||
BuildRequires: haveged
|
BuildRequires: haveged
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libaio-devel
|
BuildRequires: libaio-devel
|
||||||
@ -54,6 +55,7 @@ and processes can be seen. Child processes can also be tracked.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
|
121
update-futex-test-in-accordance-with-kernel-s-v4.15-.patch
Normal file
121
update-futex-test-in-accordance-with-kernel-s-v4.15-.patch
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
From: Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||||
|
Date: Wed, 24 Jan 2018 09:55:50 -0500
|
||||||
|
Subject: Update futex test in accordance with kernel's v4.15-rc7-202-gfbe0e83
|
||||||
|
Patch-mainline: yes
|
||||||
|
References: fix new kernels
|
||||||
|
|
||||||
|
* futex.c (VALP, VALP_PR, VAL2P, VAL2P_PR): New macro definitions.
|
||||||
|
(main): Allow EINVAL on *REQUEUE* checks with VAL/VAL2 with higher bit
|
||||||
|
being set, check that the existing behaviour preserved with VALP/VAL2P
|
||||||
|
where higher bit is unset.
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||||
|
---
|
||||||
|
tests/futex.c | 54 +++++++++++++++++++++++++++++++++++++++++++-----------
|
||||||
|
1 file changed, 43 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/futex.c b/tests/futex.c
|
||||||
|
index 41e9d1bf048e..833a20f9591c 100644
|
||||||
|
--- a/tests/futex.c
|
||||||
|
+++ b/tests/futex.c
|
||||||
|
@@ -152,14 +152,20 @@ void invalid_op(int *val, int op, uint32_t argmask, ...)
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* Value which differs from one stored in int *val */
|
||||||
|
-# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
||||||
|
-# define VAL_PR ((unsigned) VAL)
|
||||||
|
+# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
||||||
|
+# define VAL_PR ((unsigned) VAL)
|
||||||
|
|
||||||
|
-# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
||||||
|
-# define VAL2_PR ((unsigned) VAL2)
|
||||||
|
+# define VALP ((unsigned long) 0xbadda7a01acefeedLLU)
|
||||||
|
+# define VALP_PR ((unsigned) VALP)
|
||||||
|
|
||||||
|
-# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
||||||
|
-# define VAL3_PR ((unsigned) VAL3)
|
||||||
|
+# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
||||||
|
+# define VAL2_PR ((unsigned) VAL2)
|
||||||
|
+
|
||||||
|
+# define VAL2P ((unsigned long) 0xbadda7a07a7b100dLLU)
|
||||||
|
+# define VAL2P_PR ((unsigned) VAL2P)
|
||||||
|
+
|
||||||
|
+# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
||||||
|
+# define VAL3_PR ((unsigned) VAL3)
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
@@ -419,16 +425,26 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
|
/* Trying to re-queue some processes but there's nothing to re-queue */
|
||||||
|
CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
||||||
|
- (rc == 0));
|
||||||
|
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
||||||
|
printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
||||||
|
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
||||||
|
|
||||||
|
+ CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
||||||
|
+ (rc == 0));
|
||||||
|
+ printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
||||||
|
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
||||||
|
+
|
||||||
|
/* Trying to re-queue some processes but there's nothing to re-queue */
|
||||||
|
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2,
|
||||||
|
- uaddr2, VAL3, (rc == 0));
|
||||||
|
+ uaddr2, VAL3, (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
||||||
|
printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
||||||
|
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
||||||
|
|
||||||
|
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VALP,
|
||||||
|
+ VAL2P, uaddr2, VAL3, (rc == 0));
|
||||||
|
+ printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
||||||
|
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
||||||
|
+
|
||||||
|
CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u",
|
||||||
|
"%#lx");
|
||||||
|
|
||||||
|
@@ -445,22 +461,38 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
|
/* Comparison re-queue with wrong val value */
|
||||||
|
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
||||||
|
- (rc == -1) && (errno == EAGAIN));
|
||||||
|
+ (rc == -1) && (errno == EAGAIN || errno == EINVAL));
|
||||||
|
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
||||||
|
uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
||||||
|
|
||||||
|
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
||||||
|
+ (rc == -1) && (errno == EAGAIN));
|
||||||
|
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
||||||
|
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
||||||
|
+
|
||||||
|
/* Successful comparison re-queue */
|
||||||
|
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr,
|
||||||
|
- (rc == 0));
|
||||||
|
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
||||||
|
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
||||||
|
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
||||||
|
|
||||||
|
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, *uaddr,
|
||||||
|
+ (rc == 0));
|
||||||
|
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
||||||
|
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
||||||
|
+
|
||||||
|
/* Successful comparison re-queue */
|
||||||
|
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL,
|
||||||
|
- VAL2, uaddr2, *uaddr, (rc == 0));
|
||||||
|
+ VAL2, uaddr2, *uaddr,
|
||||||
|
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
||||||
|
printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
||||||
|
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
||||||
|
|
||||||
|
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VALP,
|
||||||
|
+ VAL2P, uaddr2, *uaddr, (rc == 0));
|
||||||
|
+ printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
||||||
|
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
||||||
|
+
|
||||||
|
CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6,
|
||||||
|
"%u", "%u", "%#lx", "%u");
|
||||||
|
|
||||||
|
--
|
||||||
|
2.16.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user