public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
@ 2010-02-10  9:46 Shi Weihua
  2010-02-17  7:46 ` Rishikesh
  0 siblings, 1 reply; 9+ messages in thread
From: Shi Weihua @ 2010-02-10  9:46 UTC (permalink / raw)
  To: ltp-list

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<shiwh@cn.fujitsu.com>
---
--- 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2010-02-25 10:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10  9:46 [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE Shi Weihua
2010-02-17  7:46 ` Rishikesh
2010-02-17 17:14   ` Garrett Cooper
2010-02-22  7:55     ` Shi Weihua
2010-02-25  3:22       ` Garrett Cooper
2010-02-25  6:24         ` Rishikesh K Rajak
2010-02-25  9:00         ` Rishikesh K Rajak
2010-02-25  9:52           ` Garrett Cooper
2010-02-25 10:05             ` Rishikesh K Rajak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox