All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shi Weihua <shiwh@cn.fujitsu.com>
To: ltp-list <ltp-list@lists.sourceforge.net>
Subject: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
Date: Wed, 10 Feb 2010 17:46:27 +0800	[thread overview]
Message-ID: <4B728073.3070209@cn.fujitsu.com> (raw)

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

             reply	other threads:[~2010-02-10  9:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-10  9:46 Shi Weihua [this message]
2010-02-17  7:46 ` [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B728073.3070209@cn.fujitsu.com \
    --to=shiwh@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.