public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: rohit verma <rohit.170309@gmail.com>
To: ltp-list@lists.sf.net,
	"subrata@linux.vnet.ibm.com" <subrata@linux.vnet.ibm.com>,
	CAI Qian <caiqian@cclom.cn>
Subject: [LTP] patch for timer_create04 and clock_gettime03 issue.
Date: Mon, 25 May 2009 17:23:17 +0530	[thread overview]
Message-ID: <d51f89b0905250453q62395300la1dfddc20bdb0af5@mail.gmail.com> (raw)
In-Reply-To: <7B7EF7F090B9804A830ACC82F2CDE95DD01ED4@insardxms01.ap.sony.com>

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

       reply	other threads:[~2009-05-25 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7B7EF7F090B9804A830ACC82F2CDE95DD01ED4@insardxms01.ap.sony.com>
2009-05-25 11:53 ` rohit verma [this message]
2009-05-26 12:22   ` [LTP] patch for timer_create04 and clock_gettime03 issue Subrata Modak
2009-05-27 16:30 naresh kamboju

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=d51f89b0905250453q62395300la1dfddc20bdb0af5@mail.gmail.com \
    --to=rohit.170309@gmail.com \
    --cc=caiqian@cclom.cn \
    --cc=ltp-list@lists.sf.net \
    --cc=subrata@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox