* [LTP] [PATCH 1/3] Add header file lapi/signal.h
@ 2019-02-20 15:34 Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 2/3] syscalls/sighold02: Include lapi/signal.h for __SIGRT{MIN, MAX} Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 3/3] syscalls/ptrace05: " Daniel =?unknown-8bit?q?D=C3=ADaz?=
0 siblings, 2 replies; 5+ messages in thread
From: Daniel =?unknown-8bit?q?D=C3=ADaz?= @ 2019-02-20 15:34 UTC (permalink / raw)
To: ltp
Some libc implementations might differ in the definitions they
include. Exempli gratia: MUSL does not define __SIGRTMAX nor
__SIGRTMIN.
This header covers those differences for all tests that
require those definitions.
Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
include/lapi/signal.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 include/lapi/signal.h
diff --git a/include/lapi/signal.h b/include/lapi/signal.h
new file mode 100644
index 000000000..d22965a94
--- /dev/null
+++ b/include/lapi/signal.h
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 Linaro Limited. All rights reserved.
+ * Author: Daniel Díaz <daniel.diaz@linaro.org>
+ */
+
+#ifndef LAPI_SIGNAL_H
+#define LAPI_SIGNAL_H
+
+#include <signal.h>
+
+/*
+ * Some libc implementations might differ in the definitions they include. This
+ * covers those differences for all tests to successfully build.
+ */
+
+#ifndef __SIGRTMIN
+# define __SIGRTMIN 32
+#endif
+#ifndef __SIGRTMAX
+# define __SIGRTMAX (_NSIG - 1)
+#endif
+
+#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/3] syscalls/sighold02: Include lapi/signal.h for __SIGRT{MIN, MAX}
2019-02-20 15:34 [LTP] [PATCH 1/3] Add header file lapi/signal.h Daniel =?unknown-8bit?q?D=C3=ADaz?=
@ 2019-02-20 15:34 ` Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 3/3] syscalls/ptrace05: " Daniel =?unknown-8bit?q?D=C3=ADaz?=
1 sibling, 0 replies; 5+ messages in thread
From: Daniel =?unknown-8bit?q?D=C3=ADaz?= @ 2019-02-20 15:34 UTC (permalink / raw)
To: ltp
MUSL does not include __SIGRTMIN nor __SIGRTMAX. The
compatibility header can help here.
Signed-off-by: Daniel DÃaz <daniel.diaz@linaro.org>
---
testcases/kernel/syscalls/sighold/sighold02.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
index d1d4b0b06..b763142df 100644
--- a/testcases/kernel/syscalls/sighold/sighold02.c
+++ b/testcases/kernel/syscalls/sighold/sighold02.c
@@ -49,6 +49,7 @@
#include <sys/wait.h>
#include "test.h"
#include "safe_macros.h"
+#include "lapi/signal.h"
/* _XOPEN_SOURCE disables NSIG */
#ifndef NSIG
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 3/3] syscalls/ptrace05: Include lapi/signal.h for __SIGRT{MIN, MAX}
2019-02-20 15:34 [LTP] [PATCH 1/3] Add header file lapi/signal.h Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 2/3] syscalls/sighold02: Include lapi/signal.h for __SIGRT{MIN, MAX} Daniel =?unknown-8bit?q?D=C3=ADaz?=
@ 2019-02-20 15:34 ` Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 16:33 ` Petr Vorel
1 sibling, 1 reply; 5+ messages in thread
From: Daniel =?unknown-8bit?q?D=C3=ADaz?= @ 2019-02-20 15:34 UTC (permalink / raw)
To: ltp
MUSL does not include __SIGRTMIN nor __SIGRTMAX. The
compatibility header can help here.
Signed-off-by: Daniel DÃaz <daniel.diaz@linaro.org>
---
testcases/kernel/syscalls/ptrace/ptrace05.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/ptrace/ptrace05.c b/testcases/kernel/syscalls/ptrace/ptrace05.c
index 420330029..54cfa4d7b 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace05.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace05.c
@@ -38,6 +38,7 @@
#include "ptrace.h"
#include "test.h"
+#include "lapi/signal.h"
char *TCID = "ptrace05";
int TST_TOTAL = 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 3/3] syscalls/ptrace05: Include lapi/signal.h for __SIGRT{MIN, MAX}
2019-02-20 15:34 ` [LTP] [PATCH 3/3] syscalls/ptrace05: " Daniel =?unknown-8bit?q?D=C3=ADaz?=
@ 2019-02-20 16:33 ` Petr Vorel
2019-02-20 16:48 ` Daniel =?unknown-8bit?q?D=C3=ADaz?=
0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2019-02-20 16:33 UTC (permalink / raw)
To: ltp
Hi Daniel,
> MUSL does not include __SIGRTMIN nor __SIGRTMAX. The
> compatibility header can help here.
lib/tst_sig.c and testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c also
use __SIGRTMIN. Don't you have a problem to build it?
+ I'd squash adding of these includes into single commit.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH 3/3] syscalls/ptrace05: Include lapi/signal.h for __SIGRT{MIN, MAX}
2019-02-20 16:33 ` Petr Vorel
@ 2019-02-20 16:48 ` Daniel =?unknown-8bit?q?D=C3=ADaz?=
0 siblings, 0 replies; 5+ messages in thread
From: Daniel =?unknown-8bit?q?D=C3=ADaz?= @ 2019-02-20 16:48 UTC (permalink / raw)
To: ltp
Hello!
On Wed, 20 Feb 2019 at 10:33, Petr Vorel <pvorel@suse.cz> wrote:
> Hi Daniel,
>
> > MUSL does not include __SIGRTMIN nor __SIGRTMAX. The
> > compatibility header can help here.
> lib/tst_sig.c and testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c also
> use __SIGRTMIN. Don't you have a problem to build it?
Using latest LTP and latest OE-Core (MACHINE = "qemuarm64"; TCLIB =
"musl"), no, it built fine. Same for 20190115 -- it built fine. (I'm
about to submit the upgrade to that version to OE-core.)
Would you like me to add the #include in those two as well?
> + I'd squash adding of these includes into single commit.
Great! I did that for OE, so let me send that patch instead.
Thanks and greetings!
Daniel DÃaz
daniel.diaz@linaro.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-02-20 16:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 15:34 [LTP] [PATCH 1/3] Add header file lapi/signal.h Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 2/3] syscalls/sighold02: Include lapi/signal.h for __SIGRT{MIN, MAX} Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 15:34 ` [LTP] [PATCH 3/3] syscalls/ptrace05: " Daniel =?unknown-8bit?q?D=C3=ADaz?=
2019-02-20 16:33 ` Petr Vorel
2019-02-20 16:48 ` Daniel =?unknown-8bit?q?D=C3=ADaz?=
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.