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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Rishikesh @ 2010-02-17  7:46 UTC (permalink / raw)
  To: Shi Weihua; +Cc: ltp-list

On 02/10/2010 03:16 PM, Shi Weihua wrote:
> 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.
>    

Can anyone provide their review & Acked ?

Thanks "Shi Weihua" for patch.

-Rishi
> 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
>    


-- 
Thanks&  Regards
Rishi Kesh K Rajak
IBM LTC, Bangalore
LTP Maintainer
Please join IRC: #ltp @ freenode.net


------------------------------------------------------------------------------
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  2010-02-17  7:46 ` Rishikesh
@ 2010-02-17 17:14   ` Garrett Cooper
  2010-02-22  7:55     ` Shi Weihua
  0 siblings, 1 reply; 9+ messages in thread
From: Garrett Cooper @ 2010-02-17 17:14 UTC (permalink / raw)
  To: Rishikesh; +Cc: ltp-list

On Tue, Feb 16, 2010 at 11:46 PM, Rishikesh <risrajak@linux.vnet.ibm.com> wrote:
> On 02/10/2010 03:16 PM, Shi Weihua wrote:
>> 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.
>>
>
> Can anyone provide their review & Acked ?
>
> Thanks "Shi Weihua" for patch.

1. Please provide before and after (once the items were fixed) output.
2. *sigh* These constants should be autoconf conditionalized --
otherwise when Linux devs decide to change their minds about the
values of the constants or the values are different on different
architectures you'll run into red-herring errors. The test should be
resistant to this behavior, but currently isn't. This would also
prevent `ENOSYS'-like errors from showing up on kernels < 2.6.32-rc1.

Thanks,
-Garrett

------------------------------------------------------------------------------
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  2010-02-17 17:14   ` Garrett Cooper
@ 2010-02-22  7:55     ` Shi Weihua
  2010-02-25  3:22       ` Garrett Cooper
  0 siblings, 1 reply; 9+ messages in thread
From: Shi Weihua @ 2010-02-22  7:55 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list

at 2010-2-18 1:14, Garrett Cooper wrote:
> On Tue, Feb 16, 2010 at 11:46 PM, Rishikesh <risrajak@linux.vnet.ibm.com> wrote:
>> On 02/10/2010 03:16 PM, Shi Weihua wrote:
>>> 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.
>>>
>>
>> Can anyone provide their review & Acked ?
>>
>> Thanks "Shi Weihua" for patch.
> 
> 1. Please provide before and after (once the items were fixed) output.

before:
------
clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
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
clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
<snip>
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
timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
------

after ( patch merged )
------
clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
clock_gettime03    3  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
clock_gettime03    4  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
<snip>
timer_create04    1  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
timer_create04    2  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
------

> 2. *sigh* These constants should be autoconf conditionalized --
> otherwise when Linux devs decide to change their minds about the
> values of the constants or the values are different on different
> architectures you'll run into red-herring errors. The test should be
> resistant to this behavior, but currently isn't. This would also
> prevent `ENOSYS'-like errors from showing up on kernels < 2.6.32-rc1.

i checked the frequency of adding clock in include/linux/time.h.
  2005-04-16	CLOCK_REALTIME/CLOCK_MONOTONIC/CLOCK_PROCESS_CPUTIME_ID/CLOCK_THREAD_CPUTIME_ID
                (when git initialized) 
  2008-08-21	CLOCK_MONOTONIC_RAW added
  2009-08-21	CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE added
  (from http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=include/linux/time.h;h=6e026e45a179e2c66b347eb3834501a13be7ee2e;hb=aea187c46f7d03ce985e55eb1398d0776a15b928)
so, the frequency is slow, i think.
And, should to accept my patch at first. ;-)

> 
> Thanks,
> -Garrett
> 
> 

-- 
Shi Weihua

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  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
  0 siblings, 2 replies; 9+ messages in thread
From: Garrett Cooper @ 2010-02-25  3:22 UTC (permalink / raw)
  To: Shi Weihua; +Cc: ltp-list

On Sun, Feb 21, 2010 at 11:55 PM, Shi Weihua <shiwh@cn.fujitsu.com> wrote:
> at 2010-2-18 1:14, Garrett Cooper wrote:
>> On Tue, Feb 16, 2010 at 11:46 PM, Rishikesh <risrajak@linux.vnet.ibm.com> wrote:
>>> On 02/10/2010 03:16 PM, Shi Weihua wrote:
>>>> 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.
>>>>
>>>
>>> Can anyone provide their review & Acked ?
>>>
>>> Thanks "Shi Weihua" for patch.
>>
>> 1. Please provide before and after (once the items were fixed) output.
>
> before:
> ------
> clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> 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
> clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> <snip>
> 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
> timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> ------
>
> after ( patch merged )
> ------
> clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> clock_gettime03    3  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
> clock_gettime03    4  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
> clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> <snip>
> timer_create04    1  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
> timer_create04    2  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
> timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> ------
>
>> 2. *sigh* These constants should be autoconf conditionalized --
>> otherwise when Linux devs decide to change their minds about the
>> values of the constants or the values are different on different
>> architectures you'll run into red-herring errors. The test should be
>> resistant to this behavior, but currently isn't. This would also
>> prevent `ENOSYS'-like errors from showing up on kernels < 2.6.32-rc1.
>
> i checked the frequency of adding clock in include/linux/time.h.
>  2005-04-16    CLOCK_REALTIME/CLOCK_MONOTONIC/CLOCK_PROCESS_CPUTIME_ID/CLOCK_THREAD_CPUTIME_ID
>                (when git initialized)
>  2008-08-21    CLOCK_MONOTONIC_RAW added
>  2009-08-21    CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE added
>  (from http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=include/linux/time.h;h=6e026e45a179e2c66b347eb3834501a13be7ee2e;hb=aea187c46f7d03ce985e55eb1398d0776a15b928)
> so, the frequency is slow, i think.
> And, should to accept my patch at first. ;-)

    I've added the autoconf-conditionalized variables along with your
changes, and some other minor cleanups to git just moments ago.
Cheers,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  2010-02-25  3:22       ` Garrett Cooper
@ 2010-02-25  6:24         ` Rishikesh K Rajak
  2010-02-25  9:00         ` Rishikesh K Rajak
  1 sibling, 0 replies; 9+ messages in thread
From: Rishikesh K Rajak @ 2010-02-25  6:24 UTC (permalink / raw)
  To: Garrett Cooper, Shi Weihua; +Cc: ltp-list


Hi Shi,

Thanks for the patch.
@Garret , Thanks for merging.

-Rishi

On Wed, Feb 24, 2010 at 07:22:09PM -0800, Garrett Cooper wrote:
> On Sun, Feb 21, 2010 at 11:55 PM, Shi Weihua <shiwh@cn.fujitsu.com> wrote:
> > at 2010-2-18 1:14, Garrett Cooper wrote:
> >> On Tue, Feb 16, 2010 at 11:46 PM, Rishikesh <risrajak@linux.vnet.ibm.com> wrote:
> >>> On 02/10/2010 03:16 PM, Shi Weihua wrote:
> >>>> 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.
> >>>>
> >>>
> >>> Can anyone provide their review & Acked ?
> >>>
> >>> Thanks "Shi Weihua" for patch.
> >>
> >> 1. Please provide before and after (once the items were fixed) output.
> >
> > before:
> > ------
> > clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > 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
> > clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > <snip>
> > 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
> > timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > ------
> >
> > after ( patch merged )
> > ------
> > clock_gettime03    1  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > clock_gettime03    2  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > clock_gettime03    3  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
> > clock_gettime03    4  TPASS  :  got expected failure: TEST_ERRNO=EINVAL(22): Invalid argument
> > clock_gettime03    5  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > clock_gettime03    6  TPASS  :  got expected failure: TEST_ERRNO=EFAULT(14): Bad address
> > <snip>
> > timer_create04    1  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
> > timer_create04    2  TPASS  :  failed as expected: TEST_ERRNO=EINVAL(22): Invalid argument
> > timer_create04    3  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    4  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    5  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > timer_create04    6  TPASS  :  failed as expected: TEST_ERRNO=EFAULT(14): Bad address
> > ------
> >
> >> 2. *sigh* These constants should be autoconf conditionalized --
> >> otherwise when Linux devs decide to change their minds about the
> >> values of the constants or the values are different on different
> >> architectures you'll run into red-herring errors. The test should be
> >> resistant to this behavior, but currently isn't. This would also
> >> prevent `ENOSYS'-like errors from showing up on kernels < 2.6.32-rc1.
> >
> > i checked the frequency of adding clock in include/linux/time.h.
> >  2005-04-16    CLOCK_REALTIME/CLOCK_MONOTONIC/CLOCK_PROCESS_CPUTIME_ID/CLOCK_THREAD_CPUTIME_ID
> >                (when git initialized)
> >  2008-08-21    CLOCK_MONOTONIC_RAW added
> >  2009-08-21    CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE added
> >  (from http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=include/linux/time.h;h=6e026e45a179e2c66b347eb3834501a13be7ee2e;hb=aea187c46f7d03ce985e55eb1398d0776a15b928)
> > so, the frequency is slow, i think.
> > And, should to accept my patch at first. ;-)
> 
>     I've added the autoconf-conditionalized variables along with your
> changes, and some other minor cleanups to git just moments ago.
> Cheers,
> -Garrett

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  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
  1 sibling, 1 reply; 9+ messages in thread
From: Rishikesh K Rajak @ 2010-02-25  9:00 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list

On Wed, Feb 24, 2010 at 07:22:09PM -0800, Garrett Cooper wrote:
>     I've added the autoconf-conditionalized variables along with your
> changes, and some other minor cleanups to git just moments ago.
Hi Garret,

Getting the build error on today's tree as:

gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
-I/root/temp/testcases/kernel/include -D_GNU_SOURCE
-I/root/temp/testcases/kernel/timers/clock_gettime/../include
-I../../../../include -I../../../../include   -L../../../../lib
clock_gettime02.c   -lltp -lpthread -lrt -o clock_gettime02
In file included from clock_gettime02.c:73:
/root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
error: `CLOCK_MONOTONIC_RAW' undeclared here (not in a function)
/root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
error: initializer element is not constant
/root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
error: (near initialization for `clock_list[4]')
make[4]: *** [clock_gettime02] Error 1
make[4]: Leaving directory
`/root/temp/testcases/kernel/timers/clock_gettime'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/root/temp/testcases/kernel/timers'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/temp/testcases/kernel'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/temp/testcases'
make: *** [testcases-all] Error 2
[root@elm17d44 temp]# vim
/root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h


And this patch solves the problem, please Ack it if it is correct
solution, so that i can merge to tree.

    Signed-off-by: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>

diff --git a/testcases/kernel/timers/include/common_timers.h
b/testcases/kernel/timers/include/common_timers.h
index cae9626..1e103b1 100644
--- a/testcases/kernel/timers/include/common_timers.h
+++ b/testcases/kernel/timers/include/common_timers.h
@@ -19,7 +19,6 @@ clock_t clock_list[] = {
        CLOCK_MONOTONIC,
        CLOCK_PROCESS_CPUTIME_ID,
        CLOCK_THREAD_CPUTIME_ID,
-       CLOCK_MONOTONIC_RAW,
 #if HAVE_CLOCK_REALTIME_COARSE
        CLOCK_REALTIME_COARSE,
 #endif
@@ -40,7 +39,6 @@ const char *get_clock_str(const int clock_id)
        CLOCK_TO_STR(CLOCK_MONOTONIC);
        CLOCK_TO_STR(CLOCK_PROCESS_CPUTIME_ID);
        CLOCK_TO_STR(CLOCK_THREAD_CPUTIME_ID);
-       CLOCK_TO_STR(CLOCK_MONOTONIC_RAW);
 #if HAVE_CLOCK_REALTIME_COARSE
        CLOCK_TO_STR(CLOCK_REALTIME_COARSE);
 #endif

Thanks
Rishi

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  2010-02-25  9:00         ` Rishikesh K Rajak
@ 2010-02-25  9:52           ` Garrett Cooper
  2010-02-25 10:05             ` Rishikesh K Rajak
  0 siblings, 1 reply; 9+ messages in thread
From: Garrett Cooper @ 2010-02-25  9:52 UTC (permalink / raw)
  To: Garrett Cooper, Shi Weihua, ltp-list

On Thu, Feb 25, 2010 at 1:00 AM, Rishikesh K Rajak
<risrajak@linux.vnet.ibm.com> wrote:
> On Wed, Feb 24, 2010 at 07:22:09PM -0800, Garrett Cooper wrote:
>>     I've added the autoconf-conditionalized variables along with your
>> changes, and some other minor cleanups to git just moments ago.
> Hi Garret,
>
> Getting the build error on today's tree as:
>
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -I/root/temp/testcases/kernel/include -D_GNU_SOURCE
> -I/root/temp/testcases/kernel/timers/clock_gettime/../include
> -I../../../../include -I../../../../include   -L../../../../lib
> clock_gettime02.c   -lltp -lpthread -lrt -o clock_gettime02
> In file included from clock_gettime02.c:73:
> /root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
> error: `CLOCK_MONOTONIC_RAW' undeclared here (not in a function)
> /root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
> error: initializer element is not constant
> /root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h:22:
> error: (near initialization for `clock_list[4]')
> make[4]: *** [clock_gettime02] Error 1
> make[4]: Leaving directory
> `/root/temp/testcases/kernel/timers/clock_gettime'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/root/temp/testcases/kernel/timers'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/root/temp/testcases/kernel'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/temp/testcases'
> make: *** [testcases-all] Error 2
> [root@elm17d44 temp]# vim
> /root/temp/testcases/kernel/timers/clock_gettime/../include/common_timers.h
>
>
> And this patch solves the problem, please Ack it if it is correct
> solution, so that i can merge to tree.
>
>    Signed-off-by: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com>
>
> diff --git a/testcases/kernel/timers/include/common_timers.h
> b/testcases/kernel/timers/include/common_timers.h
> index cae9626..1e103b1 100644
> --- a/testcases/kernel/timers/include/common_timers.h
> +++ b/testcases/kernel/timers/include/common_timers.h
> @@ -19,7 +19,6 @@ clock_t clock_list[] = {
>        CLOCK_MONOTONIC,
>        CLOCK_PROCESS_CPUTIME_ID,
>        CLOCK_THREAD_CPUTIME_ID,
> -       CLOCK_MONOTONIC_RAW,
>  #if HAVE_CLOCK_REALTIME_COARSE
>        CLOCK_REALTIME_COARSE,
>  #endif
> @@ -40,7 +39,6 @@ const char *get_clock_str(const int clock_id)
>        CLOCK_TO_STR(CLOCK_MONOTONIC);
>        CLOCK_TO_STR(CLOCK_PROCESS_CPUTIME_ID);
>        CLOCK_TO_STR(CLOCK_THREAD_CPUTIME_ID);
> -       CLOCK_TO_STR(CLOCK_MONOTONIC_RAW);
>  #if HAVE_CLOCK_REALTIME_COARSE
>        CLOCK_TO_STR(CLOCK_REALTIME_COARSE);
>  #endif

    What version of Linux is this? I specifically took out the #ifndef
... #define ... #endif blocks because I'm trying to avoid these ad hoc
#define's scattered around the tree.
Thanks,
-Garrett

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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

* Re: [LTP] [PATCH] timers: support clockid of CLOCK_REALTIME_COARSE/CLOCK_MONOTONIC_COARSE
  2010-02-25  9:52           ` Garrett Cooper
@ 2010-02-25 10:05             ` Rishikesh K Rajak
  0 siblings, 0 replies; 9+ messages in thread
From: Rishikesh K Rajak @ 2010-02-25 10:05 UTC (permalink / raw)
  To: Garrett Cooper; +Cc: ltp-list

On Thu, Feb 25, 2010 at 01:52:23AM -0800, Garrett Cooper wrote:
> 
>     What version of Linux is this? I specifically took out the #ifndef
> ... #define ... #endif blocks because I'm trying to avoid these ad hoc
> #define's scattered around the tree.

The kernel version: 2.6.9-89.ELsmp , which RHEL4.8GA.

-Rishi

> Thanks,
> -Garrett
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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