All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kselftest/timers: Set default threadtest values to simplify execution scripts
@ 2015-03-18 15:51 John Stultz
  2015-03-19 22:01 ` Shuah Khan
  0 siblings, 1 reply; 4+ messages in thread
From: John Stultz @ 2015-03-18 15:51 UTC (permalink / raw)
  To: lkml
  Cc: John Stultz, Shuah Khan, Prarit Bhargava, Thomas Gleixner,
	Richard Cochran

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-19 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-18 15:51 [PATCH] kselftest/timers: Set default threadtest values to simplify execution scripts John Stultz
2015-03-19 22:01 ` Shuah Khan
2015-03-19 22:34   ` John Stultz
2015-03-19 22:48     ` Shuah Khan

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.