diff options
author | John Stultz <john.stultz@linaro.org> | 2015-03-18 11:51:53 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2015-03-19 14:03:34 -0400 |
commit | 1c0a7498c79443d4b72a0352dea70f27c5772b56 (patch) | |
tree | a9b8be2db1aa0d75728ebfc7412c0c38686fa0db | |
parent | 32dcfba6f8df667e4b915e0542b33ccbc8e76fa8 (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 <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>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
-rw-r--r-- | tools/testing/selftests/timers/threadtest.c | 8 |
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) | |||
126 | return NULL; | 126 | return NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | #define DEFAULT_THREAD_COUNT 8 | ||
130 | #define DEFAULT_RUNTIME 30 | ||
129 | 131 | ||
130 | int main(int argc, char **argv) | 132 | int main(int argc, char **argv) |
131 | { | 133 | { |
132 | int thread_count = 1, i; | 134 | int thread_count, i; |
133 | time_t start, now, runtime = 60; | 135 | time_t start, now, runtime; |
134 | char buf[255]; | 136 | char buf[255]; |
135 | pthread_t pth[MAX_THREADS]; | 137 | pthread_t pth[MAX_THREADS]; |
136 | int opt; | 138 | int opt; |
@@ -138,6 +140,8 @@ int main(int argc, char **argv) | |||
138 | int ret = 0; | 140 | int ret = 0; |
139 | void *(*thread)(void *) = shared_thread; | 141 | void *(*thread)(void *) = shared_thread; |
140 | 142 | ||
143 | thread_count = DEFAULT_THREAD_COUNT; | ||
144 | runtime = DEFAULT_RUNTIME; | ||
141 | 145 | ||
142 | /* Process arguments */ | 146 | /* Process arguments */ |
143 | while ((opt = getopt(argc, argv, "t:n:i")) != -1) { | 147 | while ((opt = getopt(argc, argv, "t:n:i")) != -1) { |