Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldv-alt committed Dec 1, 2021
1 parent e01665f commit 165071e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tests/ipc_msg.c
Expand Up @@ -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

Expand Down
7 changes: 6 additions & 1 deletion tests/ipc_sem.c
Expand Up @@ -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

Expand Down

0 comments on commit 165071e

Please sign in to comment.