* [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition
@ 2018-10-18 11:24 Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 2/6] realtime: Fix pthread_mutexattr_{g, s}etrobust_np detection Petr Vorel
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
and use it in realtime to fix pi-tests.
This fixes build failure on libc missing it (e.g. musl, bionic):
test-skeleton.c:112:12: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
termpid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
^~~~~~~~~~~~~~~~~~
make[5]: *** [<builtin>: testpi-6] Error 1
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
include/lapi/unistd.h | 18 ++++++++++++++++++
.../realtime/func/pi-tests/test-skeleton.c | 1 +
2 files changed, 19 insertions(+)
create mode 100644 include/lapi/unistd.h
diff --git a/include/lapi/unistd.h b/include/lapi/unistd.h
new file mode 100644
index 000000000..7ddc60e9a
--- /dev/null
+++ b/include/lapi/unistd.h
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2017 Petr Vorel <pvorel@suse.cz>
+ */
+#ifndef LAPI_UNISTD_H__
+#define LAPI_UNISTD_H__
+
+/* glibc unistd.h */
+#ifndef TEMP_FAILURE_RETRY
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
+#endif /* LAPI_UNISTD_H__ */
diff --git a/testcases/realtime/func/pi-tests/test-skeleton.c b/testcases/realtime/func/pi-tests/test-skeleton.c
index 326a8ab56..7ad4804c8 100644
--- a/testcases/realtime/func/pi-tests/test-skeleton.c
+++ b/testcases/realtime/func/pi-tests/test-skeleton.c
@@ -42,6 +42,7 @@
#include <sys/wait.h>
#include <time.h>
#include <librttest.h>
+#include "lapi/unistd.h"
void usage(void)
{
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 2/6] realtime: Fix pthread_mutexattr_{g, s}etrobust_np detection
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
@ 2018-10-18 11:24 ` Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 3/6] realtime/configure.ac: Remove unused check Petr Vorel
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
This fixes build failure on libc which does not have it (e.g. musl),
see bellow.
Also remove _GNU_SOURCE from PTHREAD_PRIO_INHERIT check as is not needed
(it requires _XOPEN_SOURCE=500 definition => POSIX 1995).
sbrk_mutex.c:112:6: warning: implicit declaration of function ‘pthread_mutexattr_setrobust_np’; did you mean ‘pthread_mutexattr_setrobust’? [-Wimplicit-function-declaration]
if (pthread_mutexattr_setrobust_np(&mutexattr, PTHREAD_MUTEX_ROBUST_NP)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pthread_mutexattr_setrobust
sbrk_mutex.c:112:49: error: ‘PTHREAD_MUTEX_ROBUST_NP’ undeclared (first use in this function); did you mean ‘PTHREAD_MUTEX_ROBUST’?
if (pthread_mutexattr_setrobust_np(&mutexattr, PTHREAD_MUTEX_ROBUST_NP)
^~~~~~~~~~~~~~~~~~~~~~~
PTHREAD_MUTEX_ROBUST
sbrk_mutex.c:112:49: note: each undeclared identifier is reported only once for each function it appears in
sbrk_mutex.c:116:6: warning: implicit declaration of function ‘pthread_mutexattr_getrobust_np’; did you mean ‘pthread_mutexattr_getrobust’? [-Wimplicit-function-declaration]
if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pthread_mutexattr_getrobust
testpi-6.c:78:9: error: ‘PTHREAD_MUTEX_ROBUST_NP’ undeclared (first use in this function); did you mean ‘PTHREAD_MUTEX_ROBUST’?
PTHREAD_MUTEX_ROBUST_NP) != 0)
^~~~~~~~~~~~~~~~~~~~~~~
PTHREAD_MUTEX_ROBUST
testpi-6.c:78:9: note: each undeclared identifier is reported only once for each function it appears in
testpi-6.c:81:6: warning: implicit declaration of function ‘pthread_mutexattr_getrobust_np’; did you mean ‘pthread_mutexattr_getrobust’? [-Wimplicit-function-declaration]
if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pthread_mutexattr_getrobust
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/realtime/m4/check.m4 | 36 ++++------------------------------
1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
index 2517e3960..957f452c3 100644
--- a/testcases/realtime/m4/check.m4
+++ b/testcases/realtime/m4/check.m4
@@ -1,9 +1,6 @@
AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
AC_TRY_COMPILE([
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <pthread.h>],[int main(void) {
pthread_mutexattr_t attr;
return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
@@ -17,35 +14,10 @@ fi
])
AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
-AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
-AC_TRY_COMPILE([
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <pthread.h>],[int main(void) {
- pthread_mutexattr_t attr;
- return pthread_mutexattr_setrobust_np(&attr, 0);
-}],[has_robust="yes"])
-if test "x$has_robust" = "xyes" ; then
- AC_DEFINE(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS,1,[Define to 1 if you have pthread_mutexattr_*robust* APIs])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
-AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
-AC_TRY_COMPILE([
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <pthread.h>],[int main(void) {
- pthread_mutexattr_t attr;
- return pthread_mutexattr_setrobust_np(&attr, 0);
-}],[has_robust="yes"])
-if test "x$has_robust" = "xyes" ; then
- AC_DEFINE(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS,1,[Define to 1 if you have pthread_mutexattr_*robust* APIs])
+ AC_CHECK_DECLS([pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np],[],[has_robust="no"],[[#define _GNU_SOURCE
+#include <pthread.h>]])
+ AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
+if test "x$has_robust" != "xno"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 3/6] realtime/configure.ac: Remove unused check
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 2/6] realtime: Fix pthread_mutexattr_{g, s}etrobust_np detection Petr Vorel
@ 2018-10-18 11:24 ` Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 4/6] Use POSIX variants of pthread robust mutex functions Petr Vorel
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS is not used anywhere.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/realtime/configure.ac | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/testcases/realtime/configure.ac b/testcases/realtime/configure.ac
index af2cbe4c0..3956773d3 100644
--- a/testcases/realtime/configure.ac
+++ b/testcases/realtime/configure.ac
@@ -38,27 +38,6 @@ else
fi
REALTIME_CHECK_PRIO_INHERIT
-
-if test "x$has_priority_inherit" = xyes; then
-
- AC_MSG_CHECKING([for pthread mutex attr protocol functions])
- AC_TRY_COMPILE([
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <pthread.h>],[int main(void) {
- pthread_mutexattr_t attr;
- (void) pthread_mutexattr_getprotocol(&attr, (void*) NULL);
- (void) pthread_mutexattr_setprotocol(&attr, 0);
- return 0;
-}],[has_pthread_mutexattr_protocol_functions="yes"])
-fi
-if test "x$has_pthread_mutexattr_protocol_functions" = "xyes" ; then
- AC_DEFINE(HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS,1,[Define to 1 if you have the pthread_mutexattr protocol APIs])
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
REALTIME_CHECK_ROBUST_APIS
LTP_CHECK_EXP10
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 4/6] Use POSIX variants of pthread robust mutex functions
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 2/6] realtime: Fix pthread_mutexattr_{g, s}etrobust_np detection Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 3/6] realtime/configure.ac: Remove unused check Petr Vorel
@ 2018-10-18 11:24 ` Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 5/6] kernel/pt_test: Add missing string.h header Petr Vorel
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
POSIX added pthread_mutexattr_setrobust, pthread_mutexattr_getrobust,
PTHREAD_MUTEX_ROBUST in POSIX.1-2008. There is no need to use their
glibc specific (now deprecated) variants. While they're on some other
libc (including uclibc-ng), they're not (at least) in musl and bionic.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.../open_posix_testsuite/functional/threads/pi_test/README | 4 ++--
testcases/realtime/00_Descriptions.txt | 2 +-
testcases/realtime/func/pi-tests/sbrk_mutex.c | 4 ++--
testcases/realtime/func/pi-tests/testpi-6.c | 6 +++---
testcases/realtime/m4/check.m4 | 3 +--
5 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/README b/testcases/open_posix_testsuite/functional/threads/pi_test/README
index 7dfec9d87..dca5b5f2f 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/README
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/README
@@ -33,14 +33,14 @@ Robust Mutex Tests
The tests are under <rtnptl-tests>/robust_test directory.
rt-nptl supports 'robust' behavior, there will be two robust modes,
-one is PTHREAD_MUTEX_ROBUST_NP mode, the other is
+one is PTHREAD_MUTEX_ROBUST mode, the other is
PTHREAD_MUTEX_ROBUST_SUN_NP mode. When the owner of a mutex dies in
the first mode, the waiter will set the mutex to ENOTRECOVERABLE
state, while in the second mode, the waiter needs to call
pthread_mutex_setconsistency_np to change the state manually.
The tests with name robust*-sun are used to test the
-PTHREAD_MUTEX_ROBUST_NP mode, other tests with name robust*-mode2 are
+PTHREAD_MUTEX_ROBUST mode, other tests with name robust*-mode2 are
used to test the PTHREAD_MUTEX_ROBUST_SUN_NP mode. Please refer to the
description in the tests for the detailed information.
diff --git a/testcases/realtime/00_Descriptions.txt b/testcases/realtime/00_Descriptions.txt
index 61aa88fee..829496824 100644
--- a/testcases/realtime/00_Descriptions.txt
+++ b/testcases/realtime/00_Descriptions.txt
@@ -127,7 +127,7 @@ testpi-5.c:
twice.
testpi-6.c:
-- Uses robust mutex lock (PTHREAD_MUTEX_ROBUST_NP) and uses test-skeleton for
+- Uses robust mutex lock (PTHREAD_MUTEX_ROBUST) and uses test-skeleton for
other things.
testpi-7.c:
diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c
index 5c325b4dc..c0431d7da 100644
--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c
+++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c
@@ -109,11 +109,11 @@ int main(int argc, char *argv[])
if (pthread_mutexattr_init(&mutexattr) != 0) {
printf("Failed to init mutexattr\n");
}
- if (pthread_mutexattr_setrobust_np(&mutexattr, PTHREAD_MUTEX_ROBUST_NP)
+ if (pthread_mutexattr_setrobust(&mutexattr, PTHREAD_MUTEX_ROBUST)
!= 0) {
printf("Can't set mutexattr robust\n");
}
- if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0) {
+ if (pthread_mutexattr_getrobust(&mutexattr, &robust) != 0) {
printf("Can't get mutexattr robust\n");
} else {
printf("robust in mutexattr is %d\n", robust);
diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c
index f715eeeed..96321f622 100644
--- a/testcases/realtime/func/pi-tests/testpi-6.c
+++ b/testcases/realtime/func/pi-tests/testpi-6.c
@@ -74,11 +74,11 @@ int do_test(int argc, char **argv)
if (pthread_mutexattr_init(&mutexattr) != 0)
printf("Failed to init mutexattr\n");
- if (pthread_mutexattr_setrobust_np(&mutexattr,
- PTHREAD_MUTEX_ROBUST_NP) != 0)
+ if (pthread_mutexattr_setrobust(&mutexattr,
+ PTHREAD_MUTEX_ROBUST) != 0)
printf("Can't set robust mutex\n");
- if (pthread_mutexattr_getrobust_np(&mutexattr, &robust) != 0)
+ if (pthread_mutexattr_getrobust(&mutexattr, &robust) != 0)
printf("Can't get mutexattr protocol\n");
else
printf("robust in mutexattr is %d\n", robust);
diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
index 957f452c3..5aa53bd42 100644
--- a/testcases/realtime/m4/check.m4
+++ b/testcases/realtime/m4/check.m4
@@ -14,8 +14,7 @@ fi
])
AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
- AC_CHECK_DECLS([pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np],[],[has_robust="no"],[[#define _GNU_SOURCE
-#include <pthread.h>]])
+ AC_CHECK_DECLS([pthread_mutexattr_getrobust, pthread_mutexattr_setrobust],[],[has_robust="no"],[[#include <pthread.h>]])
AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
if test "x$has_robust" != "xno"; then
AC_MSG_RESULT(yes)
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 5/6] kernel/pt_test: Add missing string.h header
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
` (2 preceding siblings ...)
2018-10-18 11:24 ` [LTP] [PATCH 4/6] Use POSIX variants of pthread robust mutex functions Petr Vorel
@ 2018-10-18 11:24 ` Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 6/6] posix: Update README Petr Vorel
2018-10-19 12:49 ` [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Cyril Hrubis
5 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
Fixes implicit declaration of function warnings on older compilers:
pt_test.c: In function ‘intel_pt_pmu_value’:
pt_test.c:67:6: warning: implicit declaration of function ‘strstr’ [-Wimplicit-function-declaration]
if (strstr(value, delims) == NULL) {
^~~~~~
pt_test.c:67:6: warning: incompatible implicit declaration of built-in function ‘strstr’
pt_test.c:67:6: note: include ‘<string.h>’ or provide a declaration of ‘strstr’
pt_test.c:70:3: warning: implicit declaration of function ‘strsep’; did you mean ‘strlen’? [-Wimplicit-function-declaration]
strsep(&value, delims);
^~~~~~
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/tracing/pt_test/pt_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/tracing/pt_test/pt_test.c b/testcases/kernel/tracing/pt_test/pt_test.c
index abf575d37..fe5b1e914 100644
--- a/testcases/kernel/tracing/pt_test/pt_test.c
+++ b/testcases/kernel/tracing/pt_test/pt_test.c
@@ -18,6 +18,7 @@
#include <sched.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include "tst_test.h"
#include "lapi/syscalls.h"
#include "config.h"
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 6/6] posix: Update README
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
` (3 preceding siblings ...)
2018-10-18 11:24 ` [LTP] [PATCH 5/6] kernel/pt_test: Add missing string.h header Petr Vorel
@ 2018-10-18 11:24 ` Petr Vorel
2018-10-19 12:53 ` Cyril Hrubis
2018-10-19 12:49 ` [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Cyril Hrubis
5 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2018-10-18 11:24 UTC (permalink / raw)
To: ltp
Robust Mutex Tests has been removed in
a0896f695 ("Remove the robust thread posix testcases.")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.../functional/threads/pi_test/README | 20 -------------------
1 file changed, 20 deletions(-)
diff --git a/testcases/open_posix_testsuite/functional/threads/pi_test/README b/testcases/open_posix_testsuite/functional/threads/pi_test/README
index dca5b5f2f..ae644c96c 100644
--- a/testcases/open_posix_testsuite/functional/threads/pi_test/README
+++ b/testcases/open_posix_testsuite/functional/threads/pi_test/README
@@ -28,26 +28,6 @@ watchdog timer to kill the pi mutex tests if they fail.
For different tests, there are different result analysis methods. The
following two sections will describe this in detail.
-Robust Mutex Tests
-------------------------
-The tests are under <rtnptl-tests>/robust_test directory.
-
-rt-nptl supports 'robust' behavior, there will be two robust modes,
-one is PTHREAD_MUTEX_ROBUST mode, the other is
-PTHREAD_MUTEX_ROBUST_SUN_NP mode. When the owner of a mutex dies in
-the first mode, the waiter will set the mutex to ENOTRECOVERABLE
-state, while in the second mode, the waiter needs to call
-pthread_mutex_setconsistency_np to change the state manually.
-
-The tests with name robust*-sun are used to test the
-PTHREAD_MUTEX_ROBUST mode, other tests with name robust*-mode2 are
-used to test the PTHREAD_MUTEX_ROBUST_SUN_NP mode. Please refer to the
-description in the tests for the detailed information.
-
-Using run.sh under <rtnptl-tests>/robust_test to run the robust mutex
-tests automatically, the PASS or FAIL result can be obtained from the
-stdout.
-
Priority Inheritance Mutex Tests
--------------------------
The tests are under <rtnptl-tests>/pi_test directory.
--
2.19.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
` (4 preceding siblings ...)
2018-10-18 11:24 ` [LTP] [PATCH 6/6] posix: Update README Petr Vorel
@ 2018-10-19 12:49 ` Cyril Hrubis
2018-10-19 14:57 ` Petr Vorel
5 siblings, 1 reply; 9+ messages in thread
From: Cyril Hrubis @ 2018-10-19 12:49 UTC (permalink / raw)
To: ltp
Hi!
> and use it in realtime to fix pi-tests.
> This fixes build failure on libc missing it (e.g. musl, bionic):
>
> test-skeleton.c:112:12: warning: implicit declaration of function ???TEMP_FAILURE_RETRY??? [-Wimplicit-function-declaration]
> termpid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
> ^~~~~~~~~~~~~~~~~~
> make[5]: *** [<builtin>: testpi-6] Error 1
I had no idea glibc has macro like this. I do wonder if it worth a
fallback definition if we have exactly one use in the source code tree.
Maybe we should just replace the macro with the while loop instead.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH 6/6] posix: Update README
2018-10-18 11:24 ` [LTP] [PATCH 6/6] posix: Update README Petr Vorel
@ 2018-10-19 12:53 ` Cyril Hrubis
0 siblings, 0 replies; 9+ messages in thread
From: Cyril Hrubis @ 2018-10-19 12:53 UTC (permalink / raw)
To: ltp
Hi!
And the rest of the patchset looks OK.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 9+ messages in thread
* [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition
2018-10-19 12:49 ` [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Cyril Hrubis
@ 2018-10-19 14:57 ` Petr Vorel
0 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2018-10-19 14:57 UTC (permalink / raw)
To: ltp
Hi Cyril,
> Hi!
> > and use it in realtime to fix pi-tests.
> > This fixes build failure on libc missing it (e.g. musl, bionic):
> > test-skeleton.c:112:12: warning: implicit declaration of function ???TEMP_FAILURE_RETRY??? [-Wimplicit-function-declaration]
> > termpid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
> > ^~~~~~~~~~~~~~~~~~
> > make[5]: *** [<builtin>: testpi-6] Error 1
> I had no idea glibc has macro like this. I do wonder if it worth a
> fallback definition if we have exactly one use in the source code tree.
> Maybe we should just replace the macro with the while loop instead.
Replaced and the rest pushed with your ack.
Thanks for your review!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-10-19 14:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 11:24 [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 2/6] realtime: Fix pthread_mutexattr_{g, s}etrobust_np detection Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 3/6] realtime/configure.ac: Remove unused check Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 4/6] Use POSIX variants of pthread robust mutex functions Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 5/6] kernel/pt_test: Add missing string.h header Petr Vorel
2018-10-18 11:24 ` [LTP] [PATCH 6/6] posix: Update README Petr Vorel
2018-10-19 12:53 ` Cyril Hrubis
2018-10-19 12:49 ` [LTP] [PATCH 1/6] lapi: Add TEMP_FAILURE_RETRY definition Cyril Hrubis
2018-10-19 14:57 ` Petr Vorel
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.