mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Prarit Bhargava <prarit@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Richard Cochran <richardcochran@gmail.com>
Subject: [PATCH] kselftest/timers: Set default threadtest values to simplify execution scripts
Date: Wed, 18 Mar 2015 08:51:53 -0700	[thread overview]
Message-ID: <1426693913-5738-1-git-send-email-john.stultz@linaro.org> (raw)

In order to keep the kselftest Makefiles simpler, set the threadtest
default values to the ones used in standard run_tests

Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 tools/testing/selftests/timers/threadtest.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/timers/threadtest.c b/tools/testing/selftests/timers/threadtest.c
index facd889..e632e11 100644
--- a/tools/testing/selftests/timers/threadtest.c
+++ b/tools/testing/selftests/timers/threadtest.c
@@ -126,11 +126,13 @@ void *independent_thread(void *arg)
 	return NULL;
 }
 
+#define DEFAULT_THREAD_COUNT 8
+#define DEFAULT_RUNTIME 30
 
 int main(int argc, char **argv)
 {
-	int thread_count = 1, i;
-	time_t start, now, runtime = 60;
+	int thread_count, i;
+	time_t start, now, runtime;
 	char buf[255];
 	pthread_t pth[MAX_THREADS];
 	int opt;
@@ -138,6 +140,8 @@ int main(int argc, char **argv)
 	int ret = 0;
 	void *(*thread)(void *) = shared_thread;
 
+	thread_count = DEFAULT_THREAD_COUNT;
+	runtime = DEFAULT_RUNTIME;
 
 	/* Process arguments */
 	while ((opt = getopt(argc, argv, "t:n:i")) != -1) {
-- 
1.9.1


             reply	other threads:[~2015-03-18 15:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 15:51 John Stultz [this message]
2015-03-19 22:01 ` Shuah Khan
2015-03-19 22:34   ` John Stultz
2015-03-19 22:48     ` Shuah Khan

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=1426693913-5738-1-git-send-email-john.stultz@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prarit@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®