mainline commit da15cfdae03351c689736f8d142618592e3cebc3
 (subject: time: Introduce CLOCK_REALTIME_COARSE)
added two clocks (CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE) in
2.6.32-rc1, but it has not been responded in ltp. then, the following
error message occured.
-----
clock_gettime03    3  TFAIL  :  failed to produce expected error [expected 
errno = 22 (Invalid argument), TEST_RETURN = 0]: TEST_ERRNO=???(0): Success
clock_gettime03    4  TFAIL  :  failed to produce expected error [expected 
errno = 22 (Invalid argument), TEST_RETURN = 0]: TEST_ERRNO=???(0): Success
timer_create04    1  TFAIL  :  didn't fail as expected [expected errno = 22 
(Invalid argument)]: TEST_ERRNO=???(95): Operation not supported
timer_create04    2  TFAIL  :  didn't fail as expected [expected errno = 22 
(Invalid argument)]: TEST_ERRNO=???(95): Operation not supported
-----

Following patch fixed this bug. and, passed on 2.6.32-rc1, 2.6.33-rc6, 
2.6.23.1-42.fc8.

Signed-off-by: Shi Weihua<[email protected]>
---
--- testcases/kernel/timers/include/common_timers.h.orig        2010-02-10 
16:44:56.000000000 -0500
+++ testcases/kernel/timers/include/common_timers.h     2010-02-10 
17:33:25.000000000 -0500
@@ -28,12 +28,20 @@
 #ifndef CLOCK_MONOTONIC_RAW
 #define CLOCK_MONOTONIC_RAW 4
 #endif
+#ifndef CLOCK_REALTIME_COARSE
+#define CLOCK_REALTIME_COARSE 5
+#endif
+#ifndef CLOCK_MONOTONIC_COARSE
+#define CLOCK_MONOTONIC_COARSE 6
+#endif
 clock_t clock_list[] = {
        CLOCK_REALTIME,
        CLOCK_MONOTONIC,
        CLOCK_PROCESS_CPUTIME_ID,
        CLOCK_THREAD_CPUTIME_ID,
        CLOCK_MONOTONIC_RAW,
+       CLOCK_REALTIME_COARSE,
+       CLOCK_MONOTONIC_COARSE,
 };
 #define MAX_CLOCKS (sizeof(clock_list) / sizeof(*clock_list))
 
@@ -50,6 +58,10 @@ const char *get_clock_str(const int cloc
                return "CLOCK_THREAD_CPUTIME_ID";
        case CLOCK_MONOTONIC_RAW:
                return "CLOCK_MONOTONIC_RAW";
+       case CLOCK_REALTIME_COARSE:
+               return "CLOCK_REALTIME_COARSE";
+       case CLOCK_MONOTONIC_COARSE:
+               return "CLOCK_MONOTONIC_COARSE";
        default:
                return "CLOCK_!?!?!?";
        }

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to