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:
parent
f0a7538d78
commit
923f374452
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue