From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/9] syscalls/ipc: shmctl04: Rewrite from scratch.
Date: Tue, 28 Jul 2020 11:16:40 +0200 [thread overview]
Message-ID: <20200728091640.GA24592@dell5510> (raw)
In-Reply-To: <20200717163453.9587-4-chrubis@suse.cz>
Hi Cyril,
> - /*
> - * Create a temporary directory and cd into it.
> - * This helps to ensure that a unique msgkey is created.
> - * See libs/libltpipc/libipc.c for more information.
> - */
> - tst_tmpdir();
> + TEST(shmctl(TST_RET, SHM_STAT_ANY, &ds));
Several old distros fail [1] as they miss SHM_STAT_ANY in <bits/shm.h> (added to
glibc in 2.28, to kernel in 4.17).
Of course, it's just enough to add the definition to include/tst_safe_sysv_ipc.h
(or some LAPI file).
Kind regards,
Petr
[1] https://travis-ci.org/github/pevik/ltp/builds/712476731
diff --git include/tst_safe_sysv_ipc.h include/tst_safe_sysv_ipc.h
index 3e0e50e8d..dea85f97c 100644
--- include/tst_safe_sysv_ipc.h
+++ include/tst_safe_sysv_ipc.h
@@ -10,6 +10,10 @@
#include <sys/msg.h>
#include <sys/shm.h>
+#ifndef SHM_STAT_ANY
+# define SHM_STAT_ANY 15
+#endif
+
int safe_msgget(const char *file, const int lineno, key_t key, int msgflg);
#define SAFE_MSGGET(key, msgflg) \
safe_msgget(__FILE__, __LINE__, (key), (msgflg))
next prev parent reply other threads:[~2020-07-28 9:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 16:34 [LTP] [PATCH 0/9] Rewrite shmctl() testcases Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 1/9] syscalls/ipc: shmctl02: Convert to the new library Cyril Hrubis
2020-07-19 2:51 ` Li Wang
2020-07-21 14:32 ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 2/9] syscalls/ipc: shmctl03: Remove Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 3/9] syscalls/ipc: shmctl04: Rewrite from scratch Cyril Hrubis
2020-07-19 7:48 ` Li Wang
2020-09-07 11:16 ` Cyril Hrubis
2020-07-28 9:16 ` Petr Vorel [this message]
2020-07-17 16:34 ` [LTP] [PATCH 4/9] syscalls/ipc: shmctl05 remove lib dependency Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 5/9] lib/tst_assert: Add TST_ASSERT_ULONG() Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 6/9] syscalls/ipc: Add shmctl() IPC_INFO test Cyril Hrubis
2020-07-19 9:36 ` Li Wang
2020-07-21 16:03 ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 7/9] syscalls/ipc: Add shmctl07 test Cyril Hrubis
2020-07-19 9:50 ` Li Wang
2020-09-07 14:45 ` Cyril Hrubis
2020-07-17 16:34 ` [LTP] [PATCH 8/9] syscalls/ipc: Add shmctl IPC_SET test Cyril Hrubis
2020-07-20 2:26 ` Li Wang
2020-09-07 14:47 ` Cyril Hrubis
2020-07-22 10:35 ` Martin Doucha
2020-07-17 16:34 ` [LTP] [PATCH 9/9] syscalls/ipc: Rewrite shmctl01 Cyril Hrubis
2020-07-22 14:50 ` Martin Doucha
2020-07-20 7:14 ` [LTP] [PATCH 0/9] Rewrite shmctl() testcases Yang Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200728091640.GA24592@dell5510 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox