public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Suzuki Poulose <suzuki@in.ibm.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: Linus Test Project <ltp-list@lists.sourceforge.net>,
	B N Poornima <bnpoorni@in.ibm.com>,
	Sachin P Sant <ssant@in.ibm.com>,
	Sharyathi Nagesh <sharyath@in.ibm.com>
Subject: Re: [LTP] [08/12 FAILURE] LTPE clock gettime03 fails
Date: Thu, 06 May 2010 14:33:59 +0530	[thread overview]
Message-ID: <4BE285FF.9030104@in.ibm.com> (raw)
In-Reply-To: <239C044B-6014-4FA7-AC8B-6D71AFE8FEDA@gmail.com>

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

On വ്യാഴം 06 മെയ് 2010 01:25 വൈകു, Garrett Cooper wrote:
> On May 6, 2010, at 12:04 AM, Suzuki Poulose wrote:
>
>> <fix-timer-tests-bad-header.diff>
>
> 	Maybe a better solution would be to NULL terminate the array (well, or do similar)? Using two units of measurement just seems like it'd complicate how things are being performed...

Used MAX_CLOCKS to mark the end of clock list array. Patch attached.


Thanks

Suzuki
> Thanks,
> -Garrett


[-- Attachment #2: fix-timer-tests-bad-header.diff --]
[-- Type: text/plain, Size: 1760 bytes --]

The MAX_CLOCKS supported by the kernel is 16. But the kernel may not have all
the clock sources defined in the range 0-15.

Hence, to test whether kernel returns error for an INVALID clock source id,
we should use the upper limit MAX_CLOCKS (16 at the moment).

But to verify the the defined clocks work fine, we should loop through the "list"
of clock sources defined for sure. MAX_CLOCKS marsk the end of the clock sources in the 
array.

Signed-off-by: Suzuki K P <suzuki@in.ibm.com>

Index: ltp/testcases/kernel/timers/include/common_timers.h
===================================================================
--- ltp.orig/testcases/kernel/timers/include/common_timers.h	2009-12-06 20:53:44.000000000 +0000
+++ ltp/testcases/kernel/timers/include/common_timers.h	2010-05-05 09:17:58.000000000 +0000
@@ -35,7 +35,10 @@
 	CLOCK_THREAD_CPUTIME_ID,
 	CLOCK_MONOTONIC_RAW,
 };
-#define MAX_CLOCKS (sizeof(clock_list) / sizeof(*clock_list))
+/* CLOCKS_DEFINED is the number of clock sources defined for sure */
+#define CLOCKS_DEFINED (sizeof(clock_list) / sizeof(*clock_list))
+/* MAX_CLOCKS is the maximum number of clock sources supported by kernel */
+#define MAX_CLOCKS 16
 
 const char *get_clock_str(const int clock_id)
 {
Index: ltp/testcases/kernel/timers/timer_create/timer_create02.c
===================================================================
--- ltp.orig/testcases/kernel/timers/timer_create/timer_create02.c	2010-05-05 09:18:21.000000000 +0000
+++ ltp/testcases/kernel/timers/timer_create/timer_create02.c	2010-05-05 09:18:38.000000000 +0000
@@ -113,7 +113,7 @@
 
 			setup_test(i);
 
-			for (j = 0; j < MAX_CLOCKS; ++j) {
+			for (j = 0; j < CLOCKS_DEFINED; ++j) {
 
 				if (strstr(get_clock_str(clock_list[j]),
 						"CPUTIME_ID")) {

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

------------------------------------------------------------------------------

[-- 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:[~2010-05-06  9:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  6:55 [LTP] [00/12 FAILURE] Reporting LTP run issues on Fedora 13 ppc6 Subrata Modak
2010-05-06  6:56 ` [01/12 FAILURE] LTPX Memory CGROUP test creates Call Trace and Badness at mm/oom_kill.c:393 Subrata Modak
2010-05-06  6:56 ` [02/12 FAILURE] LTPX File Capabilities tests becomes defunct and does not complete beyond 12 hours Subrata Modak
2010-05-06  6:56 ` [03/12 FAILURE] LTPX Memory Conroller test fails and hangs system for more than " Subrata Modak
2010-05-06  6:56 ` [04/12 FAILURE] LTPX sysctl03 test fails Subrata Modak
2010-05-06  8:05   ` [LTP] [04/12 FAILURE] LTP? " Garrett Cooper
2010-05-06 13:53     ` Serge E. Hallyn
2010-05-06 17:38       ` Garrett Cooper
2010-05-06 17:55         ` Serge E. Hallyn
2010-05-06 17:59           ` Garrett Cooper
2010-05-06 18:39             ` Serge E. Hallyn
2010-05-07  9:05               ` Subrata Modak
2010-05-07  9:22               ` Garrett Cooper
2010-05-06  6:57 ` [05/12 FAILURE] LTPX proc01 " Subrata Modak
2010-05-06  8:04   ` [LTP] [05/12 FAILURE] LTP? " Garrett Cooper
2010-07-27 17:37     ` Subrata Modak
2010-07-27 17:38     ` Subrata Modak
2010-05-06  6:57 ` [LTP] [06/12 FAILURE] Many CONTAINER tests of LTP fail Subrata Modak
2010-05-06 17:53   ` Garrett Cooper
2010-05-06 17:59     ` Dan Smith
2010-07-27 17:40     ` Subrata Modak
2010-05-06  6:57 ` [07/12 FAILURE] LTPX MEMORY CGROUP FUNCTION tests fails Subrata Modak
2010-07-28 17:34   ` [LTP] [07/12 FAILURE] LTPE " Subrata Modak
2010-05-06  6:58 ` [08/12 FAILURE] LTPX clock gettime03 fails Subrata Modak
2010-05-06  7:04   ` [LTP] [08/12 FAILURE] LTPE " Suzuki Poulose
2010-05-06  7:55     ` Garrett Cooper
2010-05-06  9:03       ` Suzuki Poulose [this message]
2010-05-06 17:42         ` Garrett Cooper
2010-05-07  8:53           ` Subrata Modak
2010-06-01 15:40         ` Suzuki Poulose
2010-06-02 12:57           ` Subrata Modak
2010-07-27 18:03             ` Subrata Modak
2010-05-06  6:58 ` [09/12 FAILURE] LTPX timer create04 fails Subrata Modak
2010-05-07  2:12   ` [LTP] [09/12 FAILURE] LTP " Henry xu
2010-07-28 12:46   ` [LTP] [09/12 FAILURE] LTPE " Subrata Modak
2010-05-06  6:58 ` [10/12 FAILURE] LTPX ar01 fails Subrata Modak
2010-05-06  6:58 ` [11/12 FAILURE] LTPX file test fails Subrata Modak
2010-05-06  8:01   ` [LTP] [11/12 FAILURE] LTP? " Garrett Cooper
2010-05-06  6:59 ` [12/12 FAILURE] LTPX cron tests fails Subrata Modak

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=4BE285FF.9030104@in.ibm.com \
    --to=suzuki@in.ibm.com \
    --cc=bnpoorni@in.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=sharyath@in.ibm.com \
    --cc=ssant@in.ibm.com \
    --cc=yanegomi@gmail.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