aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <[email protected]>2015-03-18 08:51:53 -0700
committerShuah Khan <[email protected]>2015-03-19 12:03:34 -0600
commit1c0a7498c79443d4b72a0352dea70f27c5772b56 (patch)
treea9b8be2db1aa0d75728ebfc7412c0c38686fa0db
parent32dcfba6f8df667e4b915e0542b33ccbc8e76fa8 (diff)
kselftest/timers: Set default threadtest values to simplify execution scripts
In order to keep the kselftest Makefiles simpler, set the threadtest default values to the ones used in standard run_tests Cc: Shuah Khan <[email protected]> Cc: Prarit Bhargava <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Richard Cochran <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
-rw-r--r--tools/testing/selftests/timers/threadtest.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/testing/selftests/timers/threadtest.c b/tools/testing/selftests/timers/threadtest.c
index facd889b5f7e..e632e116f05e 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) {