]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix tst-mutexpi8
authorAndi Kleen <ak@linux.intel.com>
Thu, 9 May 2013 14:12:26 +0000 (16:12 +0200)
committerAndreas Jaeger <aj@suse.de>
Thu, 9 May 2013 14:15:50 +0000 (16:15 +0200)
2013-05-09  Andi Kleen  <ak@linux.intel.com>

* tst-mutex8.c (do_test): Check for ENABLE_PI.

nptl/ChangeLog
nptl/tst-mutex8.c

index 6cfb54756c9c19b2cba687360ba428f8794ee124..54ecd14ced3f967bf9b515ae87e3bed527df6f64 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-09  Andi Kleen  <ak@linux.intel.com>
+
+       * tst-mutex8.c (do_test): Check for ENABLE_PI.
+
 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * pthreadP.h (check_sched_policy_attr): New inline function.
index 72dc9d4992ff1a8c26452bd34ab7aeeb1508e525..2089c50d4ef89ed45bf5e8cd438103c60cc488b1 100644 (file)
@@ -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)