From: Suzuki Poulose <suzuki@in.ibm.com>
To: subrata@linux.vnet.ibm.com
Cc: ltp-list@lists.sourceforge.net, sharyath@in.ibm.com
Subject: Re: [LTP] [RFC] Patch getcpu01 testcase
Date: Fri, 29 May 2009 19:04:40 +0530 [thread overview]
Message-ID: <4A1FE470.6090400@in.ibm.com> (raw)
In-Reply-To: <1243601711.5188.40.camel@subratamodak.linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]
Subrata,
Good ! Then thats more suitable here :)
Refreshed the patch with TCONF and a better error message.
Thanks
Suzuki
Subrata Modak wrote:
> On Thu, 2009-05-28 at 22:32 +0530, Suzuki Poulose wrote:
>> Hi,
>>
>> The getcpu01 always exits with a non-zero exit code (indicating a
>> Failure as per UNIX semantics) on non-NUMA machines.
>>
>> This is due to the following code :
>>
>> tst_resm(TWARN,
>> "/sys not mounted or not a numa system. Assuming
>> one
>> node: %s",
>> strerror(errno));
>>
>>
>> Being a non-NUMA machine is not a failure, but an info. So it should
>> not
>> cause the test to have a non zero exit status.
>
> Correct,
>
>> I have attached a patch which could do the same and provide a more
>> friendly o/p.
>>
>>
>> Please apply.
>>
>> Thanks
>> Suzuki
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> plain text
>> document
>> attachment
>> (fix-warning-getcpu01.diff)
>>
>>
>> Index: ltp-20081031/testcases/kernel/syscalls/getcpu/getcpu01.c
>> ===================================================================
>> ---
>> ltp-20081031.orig/testcases/kernel/syscalls/getcpu/getcpu01.c 2008-10-23 02:23:19.000000000 -0500
>> +++
>> ltp-20081031/testcases/kernel/syscalls/getcpu/getcpu01.c 2009-05-28
>> 11:52:54.000000000 -0500
>> @@ -47,6 +47,8 @@
>> * HISTORY
>> * 06/2008 written by Sharyathi Nagesh <sharyathi@in.ibm.com>
>> *
>> + * 05/2009 Suzuki K P <suzuki@in.ibm.com>
>> + * Friendly messages for non-NUMA machines.
>> * RESTRICTIONS
>> * none
>> */
>> @@ -234,8 +236,10 @@
>>
>> directory_parent = opendir("/sys/devices/system/node");
>> if (!directory_parent) {
>> - tst_resm(TWARN,
>> - "/sys not mounted or not a numa system. Assuming
>> one node: %s",
>> + tst_resm(TINFO,
>> + "/sys not mounted or not a numa system.
>> Assuming one node");
>> + tst_resm(TINFO,
>
> Use TCONF instead of TINFO. That reflects that some system configuration
> was missing, and, it will not return error value at all.
>
> Regards--
> Subrata
>
>> + "Reason /sys/devices/system/node :%s",
>> strerror(errno));
>> return 0; //By Default assume it to belong to
>> node Zero
>> } else {
>>
>
[-- Attachment #2: fix-warning-getcpu01.diff --]
[-- Type: text/plain, Size: 1122 bytes --]
Index: ltp-20081031/testcases/kernel/syscalls/getcpu/getcpu01.c
===================================================================
--- ltp-20081031.orig/testcases/kernel/syscalls/getcpu/getcpu01.c 2008-10-23 02:23:19.000000000 -0500
+++ ltp-20081031/testcases/kernel/syscalls/getcpu/getcpu01.c 2009-05-29 08:33:01.000000000 -0500
@@ -47,6 +47,9 @@
* HISTORY
* 06/2008 written by Sharyathi Nagesh <sharyathi@in.ibm.com>
*
+ * 05/2009 Suzuki K P <suzuki@in.ibm.com>
+ * Use TCONF instead of TWARN for non-NUMA machines
+ *
* RESTRICTIONS
* none
*/
@@ -234,8 +237,10 @@
directory_parent = opendir("/sys/devices/system/node");
if (!directory_parent) {
- tst_resm(TWARN,
- "/sys not mounted or not a numa system. Assuming one node: %s",
+ tst_resm(TCONF,
+ "/sys not mounted or not a numa system. Assuming one node");
+ tst_resm(TCONF,
+ "Error opening: /sys/devices/system/node :%s",
strerror(errno));
return 0; //By Default assume it to belong to node Zero
} else {
[-- Attachment #3: Type: text/plain, Size: 444 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 as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/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
next prev parent reply other threads:[~2009-05-29 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 17:02 [LTP] [RFC] Patch getcpu01 testcase Suzuki Poulose
2009-05-29 12:55 ` Subrata Modak
2009-05-29 13:34 ` Suzuki Poulose [this message]
2009-05-30 18:40 ` 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=4A1FE470.6090400@in.ibm.com \
--to=suzuki@in.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=sharyath@in.ibm.com \
--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