From 66c13581afc5d348089bb9dcb68142ee3d26006e Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 9 May 2013 16:12:26 +0200 Subject: Fix tst-mutexpi8 2013-05-09 Andi Kleen * tst-mutex8.c (do_test): Check for ENABLE_PI. --- nptl/ChangeLog | 4 ++++ nptl/tst-mutex8.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 6cfb54756c..54ecd14ced 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2013-05-09 Andi Kleen + + * tst-mutex8.c (do_test): Check for ENABLE_PI. + 2013-04-22 Siddhesh Poyarekar * pthreadP.h (check_sched_policy_attr): New inline function. diff --git a/nptl/tst-mutex8.c b/nptl/tst-mutex8.c index 72dc9d4992..2089c50d4e 100644 --- a/nptl/tst-mutex8.c +++ b/nptl/tst-mutex8.c @@ -333,6 +333,13 @@ do_test (void) puts ("1st mutexattr_settype failed"); return 1; } +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT)) + { + puts ("1st pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif puts ("check recursive mutex"); res |= check_type ("recursive", &ma); if (pthread_mutexattr_destroy (&ma) != 0) @@ -351,6 +358,13 @@ do_test (void) puts ("2nd mutexattr_settype failed"); return 1; } +#ifdef ENABLE_PI + if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT)) + { + puts ("2nd pthread_mutexattr_setprotocol failed"); + return 1; + } +#endif puts ("check error-checking mutex"); res |= check_type ("error-checking", &ma); if (pthread_mutexattr_destroy (&ma) != 0) -- cgit 1.4.1