public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] realtime: Remove robust_api check
Date: Fri,  4 Dec 2020 06:25:32 +0100	[thread overview]
Message-ID: <20201204052532.409635-1-lkml@jv-coder.de> (raw)

From: Joerg Vehlow <joerg.vehlow@aox-tech.de>

pthread_mutexattr_*robust is implemented in glibc for the last 10 years.
It is not required anymore to check if it is available.
Additonally the implementation is broken, because the macro
HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS was not set.

Signed-off-by: Joerg Vehlow <joerg.vehlow@aox-tech.de>
---
 testcases/realtime/configure.ac               |  1 -
 testcases/realtime/func/pi-tests/sbrk_mutex.c | 11 -----------
 testcases/realtime/func/pi-tests/testpi-6.c   |  8 --------
 testcases/realtime/m4/check.m4                | 10 ----------
 4 files changed, 30 deletions(-)

diff --git a/testcases/realtime/configure.ac b/testcases/realtime/configure.ac
index 46a616bfc..e483caf0d 100644
--- a/testcases/realtime/configure.ac
+++ b/testcases/realtime/configure.ac
@@ -36,7 +36,6 @@ else
 fi
 
 REALTIME_CHECK_PRIO_INHERIT
-REALTIME_CHECK_ROBUST_APIS
 
 LTP_CHECK_EXP10
 
diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c
index c0431d7da..7ed7969d9 100644
--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c
+++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c
@@ -45,8 +45,6 @@
 #include <unistd.h>
 #include "librttest.h"
 
-#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
-
 #define NUM_MUTEXES 5000
 #define NUM_THREADS 50
 #define NUM_CONCURRENT_LOCKS 50
@@ -150,12 +148,3 @@ int main(int argc, char *argv[])
 
 	return 0;
 }
-
-#else
-int main(void)
-{
-	printf
-	    ("Your system doesn't support the pthread robust mutexattr APIs\n");
-	return 1;
-}
-#endif
diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c
index 96321f622..637d38355 100644
--- a/testcases/realtime/func/pi-tests/testpi-6.c
+++ b/testcases/realtime/func/pi-tests/testpi-6.c
@@ -41,7 +41,6 @@
 #include <unistd.h>
 #include <librttest.h>
 
-#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
 pthread_mutex_t child_mutex;
 
 void *child_thread(void *arg)
@@ -92,12 +91,5 @@ int do_test(int argc, char **argv)
 
 	return 0;
 }
-#else
-int do_test(int argc, char **argv)
-{
-	printf("Your system doesn't have robust pthread mutex support\n");
-	return 1;
-}
-#endif
 
 #include "test-skeleton.c"
diff --git a/testcases/realtime/m4/check.m4 b/testcases/realtime/m4/check.m4
index 5aa53bd42..e60ae1928 100644
--- a/testcases/realtime/m4/check.m4
+++ b/testcases/realtime/m4/check.m4
@@ -12,13 +12,3 @@ else
 	AC_MSG_RESULT(no)
 fi
 ])
-
-AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
-	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)
-else
-	AC_MSG_RESULT(no)
-fi
-])
-- 
2.25.1


             reply	other threads:[~2020-12-04  5:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  5:25 Joerg Vehlow [this message]
2020-12-04 10:08 ` [LTP] [PATCH] realtime: Remove robust_api check Cyril Hrubis

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=20201204052532.409635-1-lkml@jv-coder.de \
    --to=lkml@jv-coder.de \
    --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