|
|
71941d |
commit 79d10dfc20985225e4ea044d3875c4cea09053d7
|
|
|
71941d |
Author: Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
71941d |
Date: Wed Jan 24 09:55:50 2018 -0500
|
|
|
71941d |
|
|
|
71941d |
Update futex test in accordance with kernel's v4.15-rc7-202-gfbe0e83
|
|
|
71941d |
|
|
|
71941d |
* futex.c (VALP, VALP_PR, VAL2P, VAL2P_PR): New macro definitions.
|
|
|
71941d |
(main): Allow EINVAL on *REQUEUE* checks with VAL/VAL2 with higher bit
|
|
|
71941d |
being set, check that the existing behaviour preserved with VALP/VAL2P
|
|
|
71941d |
where higher bit is unset.
|
|
|
71941d |
|
|
|
71941d |
diff -rup a/tests/futex.c b/tests/futex.c
|
|
|
71941d |
--- a/tests/futex.c 2017-05-22 13:33:51.000000000 -0400
|
|
|
71941d |
+++ b/tests/futex.c 2018-04-03 12:12:08.445383018 -0400
|
|
|
71941d |
@@ -150,14 +150,20 @@ void invalid_op(int *val, int op, uint32
|
|
|
71941d |
} while (0)
|
|
|
71941d |
|
|
|
71941d |
/* Value which differs from one stored in int *val */
|
|
|
71941d |
-# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
-# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
+# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
+# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
-# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+# define VALP ((unsigned long) 0xbadda7a01acefeedLLU)
|
|
|
71941d |
+# define VALP_PR ((unsigned) VALP)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
-# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
+# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
+# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL2P ((unsigned long) 0xbadda7a07a7b100dLLU)
|
|
|
71941d |
+# define VAL2P_PR ((unsigned) VAL2P)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
+# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
|
|
|
71941d |
int
|
|
|
71941d |
main(int argc, char *argv[])
|
|
|
71941d |
@@ -417,16 +423,26 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2,
|
|
|
71941d |
- uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ uaddr2, VAL3, (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u",
|
|
|
71941d |
"%#lx");
|
|
|
71941d |
|
|
|
71941d |
@@ -443,22 +459,38 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Comparison re-queue with wrong val value */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN || errno == EINVAL));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL,
|
|
|
71941d |
- VAL2, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ VAL2, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6,
|
|
|
71941d |
"%u", "%u", "%#lx", "%u");
|
|
|
71941d |
|
|
|
71941d |
diff -rup a/tests-m32/futex.c b/tests-m32/futex.c
|
|
|
71941d |
--- a/tests-m32/futex.c 2017-05-22 13:33:51.000000000 -0400
|
|
|
71941d |
+++ b/tests-m32/futex.c 2018-04-03 12:13:23.219848033 -0400
|
|
|
71941d |
@@ -150,14 +150,20 @@ void invalid_op(int *val, int op, uint32
|
|
|
71941d |
} while (0)
|
|
|
71941d |
|
|
|
71941d |
/* Value which differs from one stored in int *val */
|
|
|
71941d |
-# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
-# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
+# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
+# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
-# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+# define VALP ((unsigned long) 0xbadda7a01acefeedLLU)
|
|
|
71941d |
+# define VALP_PR ((unsigned) VALP)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
-# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
+# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
+# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL2P ((unsigned long) 0xbadda7a07a7b100dLLU)
|
|
|
71941d |
+# define VAL2P_PR ((unsigned) VAL2P)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
+# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
|
|
|
71941d |
int
|
|
|
71941d |
main(int argc, char *argv[])
|
|
|
71941d |
@@ -417,16 +423,26 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2,
|
|
|
71941d |
- uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ uaddr2, VAL3, (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u",
|
|
|
71941d |
"%#lx");
|
|
|
71941d |
|
|
|
71941d |
@@ -443,22 +459,38 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Comparison re-queue with wrong val value */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN || errno == EINVAL));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL,
|
|
|
71941d |
- VAL2, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ VAL2, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6,
|
|
|
71941d |
"%u", "%u", "%#lx", "%u");
|
|
|
71941d |
|
|
|
71941d |
diff -rup a/tests-mx32/futex.c b/tests-mx32/futex.c
|
|
|
71941d |
--- a/tests-mx32/futex.c 2017-05-22 13:33:51.000000000 -0400
|
|
|
71941d |
+++ b/tests-mx32/futex.c 2018-04-03 12:13:25.235860501 -0400
|
|
|
71941d |
@@ -150,14 +150,20 @@ void invalid_op(int *val, int op, uint32
|
|
|
71941d |
} while (0)
|
|
|
71941d |
|
|
|
71941d |
/* Value which differs from one stored in int *val */
|
|
|
71941d |
-# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
-# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
+# define VAL ((unsigned long) 0xbadda7a0facefeedLLU)
|
|
|
71941d |
+# define VAL_PR ((unsigned) VAL)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
-# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+# define VALP ((unsigned long) 0xbadda7a01acefeedLLU)
|
|
|
71941d |
+# define VALP_PR ((unsigned) VALP)
|
|
|
71941d |
|
|
|
71941d |
-# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
-# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
+# define VAL2 ((unsigned long) 0xbadda7a0ca7b100dLLU)
|
|
|
71941d |
+# define VAL2_PR ((unsigned) VAL2)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL2P ((unsigned long) 0xbadda7a07a7b100dLLU)
|
|
|
71941d |
+# define VAL2P_PR ((unsigned) VAL2P)
|
|
|
71941d |
+
|
|
|
71941d |
+# define VAL3 ((unsigned long) 0xbadda7a09caffee1LLU)
|
|
|
71941d |
+# define VAL3_PR ((unsigned) VAL3)
|
|
|
71941d |
|
|
|
71941d |
int
|
|
|
71941d |
main(int argc, char *argv[])
|
|
|
71941d |
@@ -417,16 +423,26 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Trying to re-queue some processes but there's nothing to re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VAL, VAL2,
|
|
|
71941d |
- uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ uaddr2, VAL3, (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, VAL3, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_REQUEUE_PRIVATE, %u, %u, %p) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_REQUEUE, ARG3 | ARG4 | ARG5, "%u", "%u",
|
|
|
71941d |
"%#lx");
|
|
|
71941d |
|
|
|
71941d |
@@ -443,22 +459,38 @@ main(int argc, char *argv[])
|
|
|
71941d |
|
|
|
71941d |
/* Comparison re-queue with wrong val value */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, VAL3,
|
|
|
71941d |
- (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN || errno == EINVAL));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, VAL3,
|
|
|
71941d |
+ (rc == -1) && (errno == EAGAIN));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, VAL3_PR, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VAL, VAL2, uaddr2, *uaddr,
|
|
|
71941d |
- (rc == 0));
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX(uaddr, FUTEX_CMP_REQUEUE, VALP, VAL2P, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
/* Successful comparison re-queue */
|
|
|
71941d |
CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VAL,
|
|
|
71941d |
- VAL2, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ VAL2, uaddr2, *uaddr,
|
|
|
71941d |
+ (rc == 0) || ((rc == -1) && (errno == EINVAL)));
|
|
|
71941d |
printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
uaddr, VAL_PR, VAL2_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
|
|
|
71941d |
+ CHECK_FUTEX_ENOSYS(uaddr, FUTEX_PRIVATE_FLAG | FUTEX_CMP_REQUEUE, VALP,
|
|
|
71941d |
+ VAL2P, uaddr2, *uaddr, (rc == 0));
|
|
|
71941d |
+ printf("futex(%p, FUTEX_CMP_REQUEUE_PRIVATE, %u, %u, %p, %u) = %s\n",
|
|
|
71941d |
+ uaddr, VALP_PR, VAL2P_PR, uaddr2, *uaddr, sprintrc(rc));
|
|
|
71941d |
+
|
|
|
71941d |
CHECK_INVALID_CLOCKRT(FUTEX_CMP_REQUEUE, ARG3 | ARG4 | ARG5 | ARG6,
|
|
|
71941d |
"%u", "%u", "%#lx", "%u");
|
|
|
71941d |
|