Skip to content

Commit

Permalink
kselftest/timers: Set default threadtest values to simplify execution…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
John Stultz authored and Shuah Khan committed Mar 19, 2015
1 parent 32dcfba commit 1c0a749
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/testing/selftests/timers/threadtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,22 @@ 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;
void *tret;
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) {
Expand Down

0 comments on commit 1c0a749

Please sign in to comment.