[v1,6/6] nptl: mutex-test9: Include CLOCK_MONOTONIC for PI
Commit Message
pthread_mutex_clocklock(MONOTONIC)/PI is now supported.
Adjust the test accordingly.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
sysdeps/pthread/tst-mutex9.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
@@ -114,7 +114,12 @@ do_test_clock (clockid_t clockid)
if (clockid == CLOCK_USE_TIMEDLOCK)
TEST_COMPARE (pthread_mutex_timedlock (m, &ts), ETIMEDOUT);
else
- TEST_COMPARE (pthread_mutex_clocklock (m, clockid, &ts), ETIMEDOUT);
+ {
+ int err = pthread_mutex_clocklock (m, clockid, &ts);
+
+ TEST_VERIFY (err == ETIMEDOUT ||
+ (clockid == CLOCK_MONOTONIC && err == EINVAL));
+ }
alarm (1);
@@ -144,9 +149,7 @@ do_test (void)
do_test_clock (CLOCK_USE_TIMEDLOCK);
do_test_clock (CLOCK_REALTIME);
-#ifndef ENABLE_PI
do_test_clock (CLOCK_MONOTONIC);
-#endif
return 0;
}