public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] patch for timer_create04 and clock_gettime03 issue.
       [not found] <7B7EF7F090B9804A830ACC82F2CDE95DD01ED4@insardxms01.ap.sony.com>
@ 2009-05-25 11:53 ` rohit verma
  2009-05-26 12:22   ` Subrata Modak
  0 siblings, 1 reply; 3+ messages in thread
From: rohit verma @ 2009-05-25 11:53 UTC (permalink / raw)
  To: ltp-list, subrata@linux.vnet.ibm.com, CAI Qian

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

Hi,

In reference to the issue with timer_create04 and clock_gettime03 for
the kernel version 2.6.29 which was reported in the link:

http://www.nabble.com/timer_create-p22376043.html, PFA the patch for
fixing the issue.

Detail on the issue: A new clockid 'CLOCK_MONOTONIC_RAW' was added
since the kernel 2.6.28
(http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.28). This
addition caused the above testcases to fail. Now, 5 clock ID's are
present in kernel ver 2.6.28 and later.

Please check the same....

Regards,
Rohit

[-- Attachment #2: timers_patch.txt --]
[-- Type: text/plain, Size: 2191 bytes --]

Patch to fix timer_create04 and clock_gettime03. New clockid CLOCK_MONOTONIC_RAW was added since linux 2.6.28.
Signed-off-by: rohit verma (rohit.170309@gmail.com)
=================================================================================================================================================
diff -ruNB ltp-full-20090430_orig/testcases/kernel/timers/include/common_timers.h ltp-full-20090430/testcases/kernel/timers/include/common_timers.h
--- ltp-full-20090430_orig/testcases/kernel/timers/include/common_timers.h	2008-02-26 16:44:45.000000000 +0530
+++ ltp-full-20090430/testcases/kernel/timers/include/common_timers.h	2009-05-25 16:07:11.000000000 +0530
@@ -22,11 +22,15 @@
 #ifndef CLOCK_THREAD_CPUTIME_ID
 #define CLOCK_THREAD_CPUTIME_ID 3
 #endif
+#ifndef CLOCK_MONOTONIC_RAW
+#define CLOCK_MONOTONIC_RAW 4
+#endif
 clock_t clock_list[] = {
 	CLOCK_REALTIME,
 	CLOCK_MONOTONIC,
 	CLOCK_PROCESS_CPUTIME_ID,
-	CLOCK_THREAD_CPUTIME_ID
+	CLOCK_THREAD_CPUTIME_ID,
+	CLOCK_MONOTONIC_RAW,
 };
 #define MAX_CLOCKS (sizeof(clock_list) / sizeof(*clock_list))
 
@@ -37,6 +41,7 @@
 		case CLOCK_MONOTONIC:          return "CLOCK_MONOTONIC";
 		case CLOCK_PROCESS_CPUTIME_ID: return "CLOCK_PROCESS_CPUTIME_ID";
 		case CLOCK_THREAD_CPUTIME_ID:  return "CLOCK_THREAD_CPUTIME_ID";
+		case CLOCK_MONOTONIC_RAW:      return "CLOCK_MONOTONIC_RAW";
 		default:                       return "CLOCK_!?!?!?";
 	}
 }
diff -ruNB ltp-full-20090430_orig/testcases/kernel/timers/timer_create/timer_create02.c ltp-full-20090430/testcases/kernel/timers/timer_create/timer_create02.c
--- ltp-full-20090430_orig/testcases/kernel/timers/timer_create/timer_create02.c	2008-02-26 16:44:45.000000000 +0530
+++ ltp-full-20090430/testcases/kernel/timers/timer_create/timer_create02.c	2009-05-25 16:41:14.000000000 +0530
@@ -93,6 +93,7 @@
 		"NULL",
 		"SIGEV_NONE"
 	};
+	const char *mrstr = "MONOTONIC_RAW";
 
 	/* parse standard options */
 	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) !=
@@ -122,6 +123,9 @@
 						continue;
 					}
 				}
+				if (strstr(get_clock_str(clock_list[j]), mrstr))
+					continue;
+
 				TEST(timer_create(clock_list[j], evp_ptr,
 							&created_timer_id));
 

[-- Attachment #3: Type: text/plain, Size: 432 bytes --]

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] patch for timer_create04 and clock_gettime03 issue.
  2009-05-25 11:53 ` [LTP] patch for timer_create04 and clock_gettime03 issue rohit verma
@ 2009-05-26 12:22   ` Subrata Modak
  0 siblings, 0 replies; 3+ messages in thread
From: Subrata Modak @ 2009-05-26 12:22 UTC (permalink / raw)
  To: rohit verma; +Cc: ltp-list

On Mon, 2009-05-25 at 17:23 +0530, rohit verma wrote: 
> Hi,
> 
> In reference to the issue with timer_create04 and clock_gettime03 for
> the kernel version 2.6.29 which was reported in the link:
> 
> http://www.nabble.com/timer_create-p22376043.html, PFA the patch for
> fixing the issue.
> 
> Detail on the issue: A new clockid 'CLOCK_MONOTONIC_RAW' was added
> since the kernel 2.6.28
> (http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.28). This
> addition caused the above testcases to fail. Now, 5 clock ID's are
> present in kernel ver 2.6.28 and later.
> 
> Please check the same....
> 
> Regards,
> Rohit

Thanks.

Regards--
Subrata



------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] patch for timer_create04 and clock_gettime03 issue.
@ 2009-05-27 16:30 naresh kamboju
  0 siblings, 0 replies; 3+ messages in thread
From: naresh kamboju @ 2009-05-27 16:30 UTC (permalink / raw)
  To: rohit.170309; +Cc: ltp-list

>> Hi,
>>
>> In reference to the issue with timer_create04 and clock_gettime03 for
>> the kernel version 2.6.29 which was reported in the link:
>> (http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.28). This
>> addition caused the above testcases to fail. Now, 5 clock ID's are
>> present in kernel ver 2.6.28 and later.
>>
>> Please check the same....
>>
>> Regards,
>> Rohit

>Thanks.

>Regards--
>Subrata

Thanks Rohit.
i have reported this issue two months back, since it was a pending issue.
Tested on 2.6.29 kernels working fine. test results log is at below this mail
Thanks for providing patch.


Best regards,
Naresh kamboju


-bash-3.2# ./timer_create04
timer_create04    1  PASS  :  timer_create(2) expected failure; Got
errno - EINVAL : Invalid parameter
timer_create04    2  PASS  :  timer_create(2) expected failure; Got
errno - EINVAL : Invalid parameter
timer_create04    3  PASS  :  timer_create(2) expected failure; Got
errno - EFAULT : Bad address
timer_create04    4  PASS  :  timer_create(2) expected failure; Got
errno - EFAULT : Bad address
timer_create04    5  PASS  :  timer_create(2) expected failure; Got
errno - EFAULT : Bad address
timer_create04    6  PASS  :  timer_create(2) expected failure; Got
errno - EFAULT : Bad address
-bash-3.2#

-bash-3.2# ./clock_gettime03
clock_gettime03    1  PASS  :  clock_gettime(2) expected failure; Got
errno - EFAULT : Bad address
clock_gettime03    2  PASS  :  clock_gettime(2) expected failure; Got
errno - EFAULT : Bad address
clock_gettime03    3  PASS  :  clock_gettime(2) expected failure; Got
errno - EINVAL : Invalid parameter
clock_gettime03    4  PASS  :  clock_gettime(2) expected failure; Got
errno - EINVAL : Invalid parameter
clock_gettime03    5  PASS  :  clock_gettime(2) expected failure; Got
errno - EFAULT : Bad address
clock_gettime03    6  PASS  :  clock_gettime(2) expected failure; Got
errno - EFAULT : Bad address
-bash-3.2#

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2009-05-27 16:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <7B7EF7F090B9804A830ACC82F2CDE95DD01ED4@insardxms01.ap.sony.com>
2009-05-25 11:53 ` [LTP] patch for timer_create04 and clock_gettime03 issue rohit verma
2009-05-26 12:22   ` Subrata Modak
2009-05-27 16:30 naresh kamboju

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