kselftest/timers: Set default threadtest values to simplify execution scripts
[deliverable/linux.git] / tools / testing / selftests / timers / threadtest.c
index facd889b5f7e909c3edac6cb9d6d7d8335f9cd36..e632e116f05e7e679f38a091072c3acf1d0954fe 100644 (file)
@@ -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) {
This page took 0.039828 seconds and 5 git commands to generate.