Fix bug in kcov_multiple_threads in t_kcov

Spawn the expected number of threads rather than hardcoding one value for
all tests.
This commit is contained in:
kamil 2019-03-10 13:24:50 +00:00
parent f0a7538d78
commit 923f374452
1 changed files with 2 additions and 2 deletions

View File

@ -418,10 +418,10 @@ kcov_multiple_threads(size_t N)
ATF_REQUIRE(__arraycount(thread) >= N); ATF_REQUIRE(__arraycount(thread) >= N);
for (i = 0; i < __arraycount(thread); i++) for (i = 0; i < N; i++)
pthread_create(&thread[i], NULL, multiple_threads_helper, NULL); pthread_create(&thread[i], NULL, multiple_threads_helper, NULL);
for (i = 0; i < __arraycount(thread); i++) for (i = 0; i < N; i++)
pthread_join(thread[i], NULL); pthread_join(thread[i], NULL);
} }