diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-12-01 00:08:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-12-01 00:08:00 +0000 |
commit | 2bf6aafbd4310390d8d745b24c6992c68a16b1e4 (patch) | |
tree | c3d5ce5f7ae453c645212771f2553f47797e77d9 | |
parent | e01665f3df44d8a77f26333b5ed67c40db9e1126 (diff) | |
download | strace-2bf6aafbd4310390d8d745b24c6992c68a16b1e4.tar.gz |
tests: disable tests for invalid msgctl and semctl commands on glibc >= 2.28
Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2,
glibc skips msgctl syscall invocations and returns EINVAL
for invalid msgctl commands.
Likewise, starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882,
glibc skips semctl syscall invocations and returns EINVAL
for invalid semctl commands.
These changes were later backported to vendor packages, e.g.:
* Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153
- Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands
to semctl, msgctl, and shmctl. (#1912670)
* tests/ipc_msg.c [GLIBC_PREREQ_GE(2, 28)] (TEST_MSGCTL_BOGUS_CMD):
Define to 0.
* tests/ipc_sem.c [GLIBC_PREREQ_GE(2, 28)] (TEST_SEMCTL_BOGUS_CMD):
Likewise.
-rw-r--r-- | tests/ipc_msg.c | 7 | ||||
-rw-r--r-- | tests/ipc_sem.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/ipc_msg.c b/tests/ipc_msg.c index 233e5e12a..0bb858f64 100644 --- a/tests/ipc_msg.c +++ b/tests/ipc_msg.c @@ -55,8 +55,13 @@ * Starting with commit glibc-2.32.9000-149-gbe9b0b9a012780a403a2, * glibc skips msgctl syscall invocations and returns EINVAL * for invalid msgctl commands. + * + * Apparently, this change was later backported to vendor packages, e.g.: + * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153 + * - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands + * to semctl, msgctl, and shmctl. (#1912670) */ -#if GLIBC_PREREQ_GE(2, 32) +#if GLIBC_PREREQ_GE(2, 28) # define TEST_MSGCTL_BOGUS_CMD 0 #endif diff --git a/tests/ipc_sem.c b/tests/ipc_sem.c index 920e1de70..19ddcc18f 100644 --- a/tests/ipc_sem.c +++ b/tests/ipc_sem.c @@ -27,8 +27,13 @@ * Starting with commit glibc-2.32.9000-147-ga16d2abd496bd974a882, * glibc skips semctl syscall invocations and returns EINVAL * for invalid semctl commands. + * + * Apparently, this change was later backported to vendor packages, e.g.: + * Thu Mar 18 2021 Carlos O'Donell <carlos@redhat.com> - 2.28-153 + * - Support SEM_STAT_ANY via semctl. Return EINVAL for unknown commands + * to semctl, msgctl, and shmctl. (#1912670) */ -#if GLIBC_PREREQ_GE(2, 32) +#if GLIBC_PREREQ_GE(2, 28) # define TEST_SEMCTL_BOGUS_CMD 0 #endif |