All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] LTP: Realtime test fixes
@ 2014-07-25 22:20 Gary S. Robertson
  2014-07-25 22:20 ` [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured Gary S. Robertson
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Gary S. Robertson @ 2014-07-25 22:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: mike.holmes

From: "Gary S. Robertson" <gary.robertson@linaro.org>

The following series of patches addresses several bugs which were preventing
some of the LTP realtime tests from running or completing in our OE-based
test environments.  The patches themselves are being separately submitted
to the upstream LTP maintainers for consideration, and are offered here
in hopes of addressing these issues in the OE LTP package until such time
as they can be obtained from a subsequent upstream LTP release.

Gary S. Robertson (3):
  LTP: Realtime tests -
    Allow-mutex-initialization-without-PI-configured
  LTP: pthread_cond_many - fix uninitialized return in parse_args
  LTP: prio-wake- eliminate deprecated usleep calls

 ...utex-initialization-without-PI-configured.patch |   66 ++++++++++++++++++++
 ...io-wake-eliminate-deprecated-usleep-calls.patch |   33 ++++++++++
 ...d_many-fix-uninitialized-return-in-option.patch |   31 +++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |    3 +
 4 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-prio-wake-eliminate-deprecated-usleep-calls.patch
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured
  2014-07-25 22:20 [PATCH 0/3] LTP: Realtime test fixes Gary S. Robertson
@ 2014-07-25 22:20 ` Gary S. Robertson
  2014-08-14 21:38   ` Gary Robertson
  2014-07-25 22:20 ` [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args Gary S. Robertson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Gary S. Robertson @ 2014-07-25 22:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: mike.holmes

From: "Gary S. Robertson" <gary.robertson@linaro.org>

In the OE build environment the features on the build host
may not match those of the runtime host -so- the conditional
compilation clauses were deleted which required the presence
of priority inheriting mutexes in order to compile initialization
of a mutex with priority inheritance.  This allows this code to
execute and fail if the runtime host lacks priority inheritance,
while eliminating any dependence on PI mutexes in the build host.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
---
 ...utex-initialization-without-PI-configured.patch |   66 ++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |    1 +
 2 files changed, 67 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch

diff --git a/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch b/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
new file mode 100644
index 0000000..2de6e22
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
@@ -0,0 +1,66 @@
+From 62dfb25fa3b6e71650bc3fff9a4a0eaec0f5ac8e Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <gary.robertson@linaro.org>
+Date: Fri, 25 Jul 2014 09:25:13 -0500
+Subject: [PATCH] Allow mutex initialization without PI configured
+
+LTP is primarily intended to be built and run on the same machine,
+and uses autotools / autoconf to determine the features of the host
+machine's environment prior to compilation.  However in the OE
+environment, LTP may get built into a generic filesystem image
+which will be used with a variety of different kernels later...
+so for the OE environment it is better not to disable features
+based on the compile-time environment.  This patch removes
+compile-time dependencies on priority-inheriting mutexes and
+allows the code to attempt initialization of PI mutexes even
+if the runtime environment lacks that feature... in which case
+the associated test should fail.
+
+Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
+---
+ testcases/realtime/lib/librttest.c            |    2 --
+ testcases/realtime/stress/pi-tests/testpi-3.c |    2 --
+ 2 files changed, 4 deletions(-)
+
+diff --git a/testcases/realtime/lib/librttest.c b/testcases/realtime/lib/librttest.c
+index 0dd6019..9f37d08 100644
+--- a/testcases/realtime/lib/librttest.c
++++ b/testcases/realtime/lib/librttest.c
+@@ -586,7 +586,6 @@ void *busy_work_us(int us)
+ 
+ void init_pi_mutex(pthread_mutex_t * m)
+ {
+-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
+ 	pthread_mutexattr_t attr;
+ 	int ret;
+ 	int protocol;
+@@ -609,7 +608,6 @@ void init_pi_mutex(pthread_mutex_t * m)
+ 	if ((ret = pthread_mutex_init(m, &attr)) != 0) {
+ 		printf("Failed to init mutex: %d (%s)\n", ret, strerror(ret));
+ 	}
+-#endif
+ 
+ 	/* FIXME: does any of this need to be destroyed ? */
+ }
+diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c b/testcases/realtime/stress/pi-tests/testpi-3.c
+index 30f38f6..807c9cc 100644
+--- a/testcases/realtime/stress/pi-tests/testpi-3.c
++++ b/testcases/realtime/stress/pi-tests/testpi-3.c
+@@ -365,7 +365,6 @@ int main(int argc, char *argv[])
+ 
+ 	printf("Start %s\n", argv[0]);
+ 
+-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
+ 	if (!nopi) {
+ 		pthread_mutexattr_t mutexattr;
+ 		int protocol;
+@@ -386,7 +385,6 @@ int main(int argc, char *argv[])
+ 			printf("Failed to init mutex: %d\n", retc);
+ 		}
+ 	}
+-#endif
+ 
+ 	startThread(&arg1);
+ 	startThread(&arg2);
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index 30761fd..2ac2187 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
     file://ltp-Do-not-link-against-libfl.patch \
     file://automake-foreign.patch \
+    file://0001-Allow-mutex-initialization-without-PI-configured.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args
  2014-07-25 22:20 [PATCH 0/3] LTP: Realtime test fixes Gary S. Robertson
  2014-07-25 22:20 ` [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured Gary S. Robertson
@ 2014-07-25 22:20 ` Gary S. Robertson
  2014-08-14 21:35   ` Gary Robertson
  2014-07-25 22:20 ` [PATCH 3/3] LTP: prio-wake- eliminate deprecated usleep calls Gary S. Robertson
  2014-07-25 23:06 ` [PATCH 0/3] LTP: Realtime test fixes Otavio Salvador
  3 siblings, 1 reply; 9+ messages in thread
From: Gary S. Robertson @ 2014-07-25 22:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: mike.holmes

From: "Gary S. Robertson" <gary.robertson@linaro.org>

The parse_args() function in realtime test pthread_cond_many contains
a switch statement im which some cases failed to initialize the
function return variable prior to returning... added an init clause
to the definition statement for the return variable.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
---
 ...d_many-fix-uninitialized-return-in-option.patch |   31 ++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |    1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch

diff --git a/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
new file mode 100644
index 0000000..90c9d8e
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
@@ -0,0 +1,31 @@
+From 409c00bf4484d40380947fd27329b64ebee29874 Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <gary.robertson@linaro.org>
+Date: Fri, 25 Jul 2014 09:41:51 -0500
+Subject: [PATCH] pthread_cond_many: fix uninitialized return in option
+ handling
+
+Some of the cases in the switch statement in parse_args() did not
+initialize the 'handled' variable which is returned by the function.
+Added an initialization to the definition of the variable.
+
+Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
+---
+ .../realtime/perf/latency/pthread_cond_many.c      |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/realtime/perf/latency/pthread_cond_many.c b/testcases/realtime/perf/latency/pthread_cond_many.c
+index f9325b5..1d39100 100644
+--- a/testcases/realtime/perf/latency/pthread_cond_many.c
++++ b/testcases/realtime/perf/latency/pthread_cond_many.c
+@@ -256,7 +256,7 @@ void usage(void)
+ 
+ int parse_args(int c, char *v)
+ {
+-	int handled;
++	int handled = 1;
+ 	switch (c) {
+ 	case 'h':
+ 		usage();
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index 2ac2187..f86a195 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://ltp-Do-not-link-against-libfl.patch \
     file://automake-foreign.patch \
     file://0001-Allow-mutex-initialization-without-PI-configured.patch \
+    file://0001-pthread_cond_many-fix-uninitialized-return-in-option.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] LTP: prio-wake- eliminate deprecated usleep calls
  2014-07-25 22:20 [PATCH 0/3] LTP: Realtime test fixes Gary S. Robertson
  2014-07-25 22:20 ` [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured Gary S. Robertson
  2014-07-25 22:20 ` [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args Gary S. Robertson
@ 2014-07-25 22:20 ` Gary S. Robertson
  2014-07-25 23:06 ` [PATCH 0/3] LTP: Realtime test fixes Otavio Salvador
  3 siblings, 0 replies; 9+ messages in thread
From: Gary S. Robertson @ 2014-07-25 22:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: mike.holmes

From: "Gary S. Robertson" <gary.robertson@linaro.org>

Minor cleanup on realtime test prio-wake.
Replaced deprecated usleep calls with calls to rt_nanosleep,
which has no potentially adverse interactions with signals.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
---
 ...io-wake-eliminate-deprecated-usleep-calls.patch |   33 ++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20140422.bb          |    1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0001-prio-wake-eliminate-deprecated-usleep-calls.patch

diff --git a/meta/recipes-extended/ltp/ltp/0001-prio-wake-eliminate-deprecated-usleep-calls.patch b/meta/recipes-extended/ltp/ltp/0001-prio-wake-eliminate-deprecated-usleep-calls.patch
new file mode 100644
index 0000000..4a43703
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-prio-wake-eliminate-deprecated-usleep-calls.patch
@@ -0,0 +1,33 @@
+From 38283c837a56d64f3d23b57e082956916fe085b2 Mon Sep 17 00:00:00 2001
+From: "Gary S. Robertson" <gary.robertson@linaro.org>
+Date: Fri, 25 Jul 2014 09:50:35 -0500
+Subject: [PATCH] prio-wake: eliminate deprecated usleep calls
+
+Replaced deprecated usleep calls with calls to rt_nanosleep,
+which has no potentially adverse interactions with signals.
+
+Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
+---
+ testcases/realtime/func/prio-wake/prio-wake.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/realtime/func/prio-wake/prio-wake.c b/testcases/realtime/func/prio-wake/prio-wake.c
+index 18c0405..f34ae30 100644
+--- a/testcases/realtime/func/prio-wake/prio-wake.c
++++ b/testcases/realtime/func/prio-wake/prio-wake.c
+@@ -108,10 +108,10 @@ void *master_thread(void *arg)
+ 
+ 	/* make sure children are started */
+ 	while (running_threads < rt_threads)
+-		usleep(1000);
++		rt_nanosleep(1000000);
+ 	/* give the worker threads a chance to get to sleep in the kernel
+ 	 * in the unlocked broadcast case. */
+-	usleep(1000);
++	rt_nanosleep(1000000);
+ 
+ 	start = rt_gettime() - beginrun;
+ 
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb b/meta/recipes-extended/ltp/ltp_20140422.bb
index f86a195..77c79f5 100644
--- a/meta/recipes-extended/ltp/ltp_20140422.bb
+++ b/meta/recipes-extended/ltp/ltp_20140422.bb
@@ -28,6 +28,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
     file://automake-foreign.patch \
     file://0001-Allow-mutex-initialization-without-PI-configured.patch \
     file://0001-pthread_cond_many-fix-uninitialized-return-in-option.patch \
+    file://0001-prio-wake-eliminate-deprecated-usleep-calls.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] LTP: Realtime test fixes
  2014-07-25 22:20 [PATCH 0/3] LTP: Realtime test fixes Gary S. Robertson
                   ` (2 preceding siblings ...)
  2014-07-25 22:20 ` [PATCH 3/3] LTP: prio-wake- eliminate deprecated usleep calls Gary S. Robertson
@ 2014-07-25 23:06 ` Otavio Salvador
  2014-07-30 23:41   ` Gary Robertson
  3 siblings, 1 reply; 9+ messages in thread
From: Otavio Salvador @ 2014-07-25 23:06 UTC (permalink / raw)
  To: Gary S. Robertson
  Cc: mike.holmes, Patches and discussions about the oe-core layer

Hello Gary,

On Fri, Jul 25, 2014 at 7:20 PM, Gary S. Robertson
<gary.robertson@linaro.org> wrote:
> The following series of patches addresses several bugs which were preventing
> some of the LTP realtime tests from running or completing in our OE-based
> test environments.  The patches themselves are being separately submitted
> to the upstream LTP maintainers for consideration, and are offered here
> in hopes of addressing these issues in the OE LTP package until such time
> as they can be obtained from a subsequent upstream LTP release.

Please prepare a v2 including the Upstream-Status[1] field in the inner patches.

1. http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Headers_and_Commit_Messages

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] LTP: Realtime test fixes
  2014-07-25 23:06 ` [PATCH 0/3] LTP: Realtime test fixes Otavio Salvador
@ 2014-07-30 23:41   ` Gary Robertson
  2014-08-14 21:43     ` Gary Robertson
  0 siblings, 1 reply; 9+ messages in thread
From: Gary Robertson @ 2014-07-30 23:41 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Mike Holmes, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Otavio,

I am currently in the process of review for a couple of these patches with
the LTP maintainers, and will re-submit once the dust settles at LTP.

Thanks,

Gary R.


On Fri, Jul 25, 2014 at 6:06 PM, Otavio Salvador <otavio@ossystems.com.br>
wrote:

> Hello Gary,
>
> On Fri, Jul 25, 2014 at 7:20 PM, Gary S. Robertson
> <gary.robertson@linaro.org> wrote:
> > The following series of patches addresses several bugs which were
> preventing
> > some of the LTP realtime tests from running or completing in our OE-based
> > test environments.  The patches themselves are being separately submitted
> > to the upstream LTP maintainers for consideration, and are offered here
> > in hopes of addressing these issues in the OE LTP package until such time
> > as they can be obtained from a subsequent upstream LTP release.
>
> Please prepare a v2 including the Upstream-Status[1] field in the inner
> patches.
>
> 1.
> http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Headers_and_Commit_Messages
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
>

[-- Attachment #2: Type: text/html, Size: 2189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args
  2014-07-25 22:20 ` [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args Gary S. Robertson
@ 2014-08-14 21:35   ` Gary Robertson
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Robertson @ 2014-08-14 21:35 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Mike Holmes

[-- Attachment #1: Type: text/plain, Size: 3143 bytes --]

I wish to drop this patch thread and re-submit the patches individually
rather than as a group - thanks.


On Fri, Jul 25, 2014 at 5:20 PM, Gary S. Robertson <
gary.robertson@linaro.org> wrote:

> From: "Gary S. Robertson" <gary.robertson@linaro.org>
>
> The parse_args() function in realtime test pthread_cond_many contains
> a switch statement im which some cases failed to initialize the
> function return variable prior to returning... added an init clause
> to the definition statement for the return variable.
>
> Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
> ---
>  ...d_many-fix-uninitialized-return-in-option.patch |   31
> ++++++++++++++++++++
>  meta/recipes-extended/ltp/ltp_20140422.bb          |    1 +
>  2 files changed, 32 insertions(+)
>  create mode 100644
> meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
>
> diff --git
> a/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
> b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
> new file mode 100644
> index 0000000..90c9d8e
> --- /dev/null
> +++
> b/meta/recipes-extended/ltp/ltp/0001-pthread_cond_many-fix-uninitialized-return-in-option.patch
> @@ -0,0 +1,31 @@
> +From 409c00bf4484d40380947fd27329b64ebee29874 Mon Sep 17 00:00:00 2001
> +From: "Gary S. Robertson" <gary.robertson@linaro.org>
> +Date: Fri, 25 Jul 2014 09:41:51 -0500
> +Subject: [PATCH] pthread_cond_many: fix uninitialized return in option
> + handling
> +
> +Some of the cases in the switch statement in parse_args() did not
> +initialize the 'handled' variable which is returned by the function.
> +Added an initialization to the definition of the variable.
> +
> +Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
> +---
> + .../realtime/perf/latency/pthread_cond_many.c      |    2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/testcases/realtime/perf/latency/pthread_cond_many.c
> b/testcases/realtime/perf/latency/pthread_cond_many.c
> +index f9325b5..1d39100 100644
> +--- a/testcases/realtime/perf/latency/pthread_cond_many.c
> ++++ b/testcases/realtime/perf/latency/pthread_cond_many.c
> +@@ -256,7 +256,7 @@ void usage(void)
> +
> + int parse_args(int c, char *v)
> + {
> +-      int handled;
> ++      int handled = 1;
> +       switch (c) {
> +       case 'h':
> +               usage();
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb
> b/meta/recipes-extended/ltp/ltp_20140422.bb
> index 2ac2187..f86a195 100644
> --- a/meta/recipes-extended/ltp/ltp_20140422.bb
> +++ b/meta/recipes-extended/ltp/ltp_20140422.bb
> @@ -27,6 +27,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
>      file://ltp-Do-not-link-against-libfl.patch \
>      file://automake-foreign.patch \
>      file://0001-Allow-mutex-initialization-without-PI-configured.patch \
> +
>  file://0001-pthread_cond_many-fix-uninitialized-return-in-option.patch \
>  "
>
>  S = "${WORKDIR}/git"
> --
> 1.7.9.5
>
>

[-- Attachment #2: Type: text/html, Size: 4272 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured
  2014-07-25 22:20 ` [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured Gary S. Robertson
@ 2014-08-14 21:38   ` Gary Robertson
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Robertson @ 2014-08-14 21:38 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Mike Holmes

[-- Attachment #1: Type: text/plain, Size: 4973 bytes --]

In retrospect this patch is not appropriate at the OE project level and
should be handled in a local layer.  Consequently I wish to withdraw it
from further consideration here.  Thank you all for your responses.


On Fri, Jul 25, 2014 at 5:20 PM, Gary S. Robertson <
gary.robertson@linaro.org> wrote:

> From: "Gary S. Robertson" <gary.robertson@linaro.org>
>
> In the OE build environment the features on the build host
> may not match those of the runtime host -so- the conditional
> compilation clauses were deleted which required the presence
> of priority inheriting mutexes in order to compile initialization
> of a mutex with priority inheritance.  This allows this code to
> execute and fail if the runtime host lacks priority inheritance,
> while eliminating any dependence on PI mutexes in the build host.
>
> Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
> ---
>  ...utex-initialization-without-PI-configured.patch |   66
> ++++++++++++++++++++
>  meta/recipes-extended/ltp/ltp_20140422.bb          |    1 +
>  2 files changed, 67 insertions(+)
>  create mode 100644
> meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
>
> diff --git
> a/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
> b/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
> new file mode 100644
> index 0000000..2de6e22
> --- /dev/null
> +++
> b/meta/recipes-extended/ltp/ltp/0001-Allow-mutex-initialization-without-PI-configured.patch
> @@ -0,0 +1,66 @@
> +From 62dfb25fa3b6e71650bc3fff9a4a0eaec0f5ac8e Mon Sep 17 00:00:00 2001
> +From: "Gary S. Robertson" <gary.robertson@linaro.org>
> +Date: Fri, 25 Jul 2014 09:25:13 -0500
> +Subject: [PATCH] Allow mutex initialization without PI configured
> +
> +LTP is primarily intended to be built and run on the same machine,
> +and uses autotools / autoconf to determine the features of the host
> +machine's environment prior to compilation.  However in the OE
> +environment, LTP may get built into a generic filesystem image
> +which will be used with a variety of different kernels later...
> +so for the OE environment it is better not to disable features
> +based on the compile-time environment.  This patch removes
> +compile-time dependencies on priority-inheriting mutexes and
> +allows the code to attempt initialization of PI mutexes even
> +if the runtime environment lacks that feature... in which case
> +the associated test should fail.
> +
> +Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
> +---
> + testcases/realtime/lib/librttest.c            |    2 --
> + testcases/realtime/stress/pi-tests/testpi-3.c |    2 --
> + 2 files changed, 4 deletions(-)
> +
> +diff --git a/testcases/realtime/lib/librttest.c
> b/testcases/realtime/lib/librttest.c
> +index 0dd6019..9f37d08 100644
> +--- a/testcases/realtime/lib/librttest.c
> ++++ b/testcases/realtime/lib/librttest.c
> +@@ -586,7 +586,6 @@ void *busy_work_us(int us)
> +
> + void init_pi_mutex(pthread_mutex_t * m)
> + {
> +-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
> +       pthread_mutexattr_t attr;
> +       int ret;
> +       int protocol;
> +@@ -609,7 +608,6 @@ void init_pi_mutex(pthread_mutex_t * m)
> +       if ((ret = pthread_mutex_init(m, &attr)) != 0) {
> +               printf("Failed to init mutex: %d (%s)\n", ret,
> strerror(ret));
> +       }
> +-#endif
> +
> +       /* FIXME: does any of this need to be destroyed ? */
> + }
> +diff --git a/testcases/realtime/stress/pi-tests/testpi-3.c
> b/testcases/realtime/stress/pi-tests/testpi-3.c
> +index 30f38f6..807c9cc 100644
> +--- a/testcases/realtime/stress/pi-tests/testpi-3.c
> ++++ b/testcases/realtime/stress/pi-tests/testpi-3.c
> +@@ -365,7 +365,6 @@ int main(int argc, char *argv[])
> +
> +       printf("Start %s\n", argv[0]);
> +
> +-#if HAVE_DECL_PTHREAD_PRIO_INHERIT
> +       if (!nopi) {
> +               pthread_mutexattr_t mutexattr;
> +               int protocol;
> +@@ -386,7 +385,6 @@ int main(int argc, char *argv[])
> +                       printf("Failed to init mutex: %d\n", retc);
> +               }
> +       }
> +-#endif
> +
> +       startThread(&arg1);
> +       startThread(&arg2);
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-extended/ltp/ltp_20140422.bb
> b/meta/recipes-extended/ltp/ltp_20140422.bb
> index 30761fd..2ac2187 100644
> --- a/meta/recipes-extended/ltp/ltp_20140422.bb
> +++ b/meta/recipes-extended/ltp/ltp_20140422.bb
> @@ -26,6 +26,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
>      file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
> \
>      file://ltp-Do-not-link-against-libfl.patch \
>      file://automake-foreign.patch \
> +    file://0001-Allow-mutex-initialization-without-PI-configured.patch \
>  "
>
>  S = "${WORKDIR}/git"
> --
> 1.7.9.5
>
>

[-- Attachment #2: Type: text/html, Size: 6264 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/3] LTP: Realtime test fixes
  2014-07-30 23:41   ` Gary Robertson
@ 2014-08-14 21:43     ` Gary Robertson
  0 siblings, 0 replies; 9+ messages in thread
From: Gary Robertson @ 2014-08-14 21:43 UTC (permalink / raw)
  To: Otavio Salvador
  Cc: Mike Holmes, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

After exchanges with the LTP maintainers and further reflection, I find
some of the patches submitted here are inappropriate for submission at the
OE level.
Consequently I wish to drop this email thread and submit those patches
which I believe should be applied at the OE level as separate submissions.
Thank you all for your responses.


On Wed, Jul 30, 2014 at 6:41 PM, Gary Robertson <gary.robertson@linaro.org>
wrote:

> Otavio,
>
> I am currently in the process of review for a couple of these patches with
> the LTP maintainers, and will re-submit once the dust settles at LTP.
>
> Thanks,
>
> Gary R.
>
>
> On Fri, Jul 25, 2014 at 6:06 PM, Otavio Salvador <otavio@ossystems.com.br>
> wrote:
>
>> Hello Gary,
>>
>> On Fri, Jul 25, 2014 at 7:20 PM, Gary S. Robertson
>> <gary.robertson@linaro.org> wrote:
>> > The following series of patches addresses several bugs which were
>> preventing
>> > some of the LTP realtime tests from running or completing in our
>> OE-based
>> > test environments.  The patches themselves are being separately
>> submitted
>> > to the upstream LTP maintainers for consideration, and are offered here
>> > in hopes of addressing these issues in the OE LTP package until such
>> time
>> > as they can be obtained from a subsequent upstream LTP release.
>>
>> Please prepare a v2 including the Upstream-Status[1] field in the inner
>> patches.
>>
>> 1.
>> http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Headers_and_Commit_Messages
>>
>> --
>> Otavio Salvador                             O.S. Systems
>> http://www.ossystems.com.br        http://code.ossystems.com.br
>> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3031 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-14 21:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-25 22:20 [PATCH 0/3] LTP: Realtime test fixes Gary S. Robertson
2014-07-25 22:20 ` [PATCH 1/3] LTP: Realtime tests - Allow-mutex-initialization-without-PI-configured Gary S. Robertson
2014-08-14 21:38   ` Gary Robertson
2014-07-25 22:20 ` [PATCH 2/3] LTP: pthread_cond_many - fix uninitialized return in parse_args Gary S. Robertson
2014-08-14 21:35   ` Gary Robertson
2014-07-25 22:20 ` [PATCH 3/3] LTP: prio-wake- eliminate deprecated usleep calls Gary S. Robertson
2014-07-25 23:06 ` [PATCH 0/3] LTP: Realtime test fixes Otavio Salvador
2014-07-30 23:41   ` Gary Robertson
2014-08-14 21:43     ` Gary Robertson

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.