From: Poornima Nayak <mpnayak@linux.vnet.ibm.com>
To: vaidy <svaidy@linux.vnet.ibm.com>,
ltp-list@lists.sourceforge.net, gautham <ego@in.ibm.com>,
arun@linux.vnet.ibm.com
Subject: [LTP] Patch to get max sched mc & smt values based on kernel version
Date: Thu, 20 Aug 2009 21:37:23 +0530 [thread overview]
Message-ID: <20090820160723.30926.96672.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090820160655.30926.34854.sendpatchset@localhost.localdomain>
Replaces shell function with C functions to get max sched_mc & sched_smt value.
Since this uses LTP libraray function to analyze kernel version maintenence of the
code will be easier.
Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>
diff -uprN ltp-full-20090731_orig/testcases/kernel/power_management/get_sched_values.c ltp-full-20090731/testcases/kernel/power_management/get_sched_values.c
--- ltp-full-20090731_orig/testcases/kernel/power_management/get_sched_values.c 1970-01-01 05:30:00.000000000 +0530
+++ ltp-full-20090731/testcases/kernel/power_management/get_sched_values.c 2009-08-20 20:38:13.000000000 +0530
@@ -0,0 +1,53 @@
+/************************************************************************
+* Copyright (c) International Business Machines Corp., 2008
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation; either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+* the GNU General Public License for more details.
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*
+***************************************************************************/
+#include <stdio.h>
+#include <test.h>
+
+int get_supp_sched_mc(void) {
+ if (tst_kvercmp(2,6,29) < 0 )
+ return 1;
+ else
+ return 2;
+}
+
+int get_supp_sched_smt(void) {
+ if (tst_kvercmp(2,6,29) < 0 )
+ return 1;
+ else
+ return 2;
+}
+
+int main(int argc, char **argv)
+{
+ char *param;
+ if (argc == 0)
+ return 1;
+ else
+ {
+ param = argv[1];
+ if (strcmp(param, "sched_mc")==0)
+ if (get_supp_sched_mc() == 0)
+ return 0;
+ else
+ return 1;
+ if (strcmp(param, "sched_smt")==0)
+ if (get_supp_sched_smt() == 0)
+ return 0;
+ else
+ return 1;
+ }
+}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2009-08-20 16:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 16:06 [LTP] Patch to fix kernbench integration issue Poornima Nayak
2009-08-20 16:07 ` [LTP] Patch to fix make install issue in ebizzy Poornima Nayak
2009-08-20 16:52 ` Garrett Cooper
2009-08-23 7:29 ` Subrata Modak
2009-08-20 16:07 ` [LTP] Patch to include workload for consolidation verification Poornima Nayak
2009-08-23 7:29 ` Subrata Modak
2009-08-20 16:07 ` Poornima Nayak [this message]
2009-08-23 7:29 ` [LTP] Patch to get max sched mc & smt values based on kernel version Subrata Modak
2009-08-20 16:07 ` [LTP] New & modified reusable functions for new & existing testcases Poornima Nayak
2009-08-20 16:51 ` Garrett Cooper
2009-08-23 7:29 ` Subrata Modak
2009-08-20 16:07 ` [LTP] Patch for PM makefile for new testcases & fix test_sched_smt integration issue Poornima Nayak
2009-08-20 17:01 ` Garrett Cooper
2009-08-23 7:28 ` Subrata Modak
2009-08-20 16:07 ` [LTP] Patch for PM Master script to integrate new testcases Poornima Nayak
2009-08-23 7:29 ` Subrata Modak
2009-08-20 16:08 ` [LTP] Patch to fix cpu consolidation failure for kernbench on HT system Poornima Nayak
2009-08-20 17:00 ` Garrett Cooper
2009-08-23 7:28 ` Subrata Modak
2009-08-20 16:08 ` [LTP] New testcase to test timer_migration interface Poornima Nayak
2009-08-20 16:57 ` Garrett Cooper
2009-08-20 16:57 ` Garrett Cooper
2009-08-23 7:29 ` Subrata Modak
2009-08-20 16:53 ` [LTP] Patch to fix kernbench integration issue Garrett Cooper
2009-08-23 7:29 ` 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=20090820160723.30926.96672.sendpatchset@localhost.localdomain \
--to=mpnayak@linux.vnet.ibm.com \
--cc=arun@linux.vnet.ibm.com \
--cc=ego@in.ibm.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=svaidy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.