[oe-commits] Gary S. Robertson : LTP - realtime tests - fix bad robust mutex conditionals

git at git.openembedded.org git at git.openembedded.org
Mon Oct 6 14:03:04 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 59260a1f6f77d5399523f8441fc82a1be55b1788
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=59260a1f6f77d5399523f8441fc82a1be55b1788

Author: Gary S. Robertson <gary.robertson at linaro.org>
Date:   Fri Oct  3 10:17:48 2014 -0500

LTP - realtime tests - fix bad robust mutex conditionals

The tests for robust mutexes contained conditional clauses which failed in
autoconf and/or used nonexistent variable names.  Modified these
conditional clauses to use only the variables actually created by
LTP autoconf for this purpose.

Signed-off-by: Gary S. Robertson <gary.robertson at linaro.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 ...ltime-tests-Fix-robust-mutex-conditionals.patch | 62 ++++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |  1 +
 2 files changed, 63 insertions(+)

diff --git a/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch
new file mode 100644
index 0000000..ccdd4d0
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Realtime-tests-Fix-robust-mutex-conditionals.patch
@@ -0,0 +1,62 @@
+From 663a14423baea0e05ba79d90d2497dde5e4594bd Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <gary.robertson at linaro.org>
+Date: Thu, 11 Sep 2014 13:02:47 -0500
+Subject: [LTP][PATCH] Realtime tests: Fix robust mutex conditionals
+
+sbrk_mutex, testpi-5, and testpi-6 realtime tests in subdir
+testcases/realtime/func/pi-tests used compile time config variables
+which were not generated by autoconf in order to configure tests
+for robust mutexes.  Changed these conditionals to use the config
+variables actually generated in the autoconf process.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Gary S. Robertson <gary.robertson at linaro.org>
+---
+ testcases/realtime/func/pi-tests/sbrk_mutex.c |    2 +-
+ testcases/realtime/func/pi-tests/testpi-5.c   |    2 +-
+ testcases/realtime/func/pi-tests/testpi-6.c   |    2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/testcases/realtime/func/pi-tests/sbrk_mutex.c b/testcases/realtime/func/pi-tests/sbrk_mutex.c
+index 684021f..5c325b4 100644
+--- a/testcases/realtime/func/pi-tests/sbrk_mutex.c
++++ b/testcases/realtime/func/pi-tests/sbrk_mutex.c
+@@ -45,7 +45,7 @@
+ #include <unistd.h>
+ #include "librttest.h"
+ 
+-#if defined(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS) && defined(PTHREAD_MUTEX_ROBUST_NP)
++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
+ 
+ #define NUM_MUTEXES 5000
+ #define NUM_THREADS 50
+diff --git a/testcases/realtime/func/pi-tests/testpi-5.c b/testcases/realtime/func/pi-tests/testpi-5.c
+index a1d93cc..70f02fd 100644
+--- a/testcases/realtime/func/pi-tests/testpi-5.c
++++ b/testcases/realtime/func/pi-tests/testpi-5.c
+@@ -69,7 +69,7 @@ int do_test(int argc, char **argv)
+ 	pthread_mutexattr_t mutexattr;
+ 	int retc, protocol;
+ 
+-#if HAS_PTHREAD_MUTEXATTR_PROTOCOL_FUNCTIONS
++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
+ 
+ 	if (pthread_mutexattr_init(&mutexattr) != 0)
+ 		printf("Failed to init mutexattr\n");
+diff --git a/testcases/realtime/func/pi-tests/testpi-6.c b/testcases/realtime/func/pi-tests/testpi-6.c
+index b3c3e4a..f715eee 100644
+--- a/testcases/realtime/func/pi-tests/testpi-6.c
++++ b/testcases/realtime/func/pi-tests/testpi-6.c
+@@ -41,7 +41,7 @@
+ #include <unistd.h>
+ #include <librttest.h>
+ 
+-#if defined(PTHREAD_MUTEX_ROBUST_NP)
++#if HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS
+ pthread_mutex_t child_mutex;
+ 
+ void *child_thread(void *arg)
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index 499b263..5deaabf 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -29,6 +29,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://make-setregid02-work.patch \
     file://add-knob-for-numa.patch \
     file://0001-Realtime-tests-Fix-bad-priority-inheritance-conditio.patch \
+    file://0001-Realtime-tests-Fix-robust-mutex-conditionals.patch \
 "
 
 S = "${WORKDIR}/git"



More information about the Openembedded-commits mailing list