powerpc/selftests: Wait all threads to join
authorBreno Leitao <leitao@debian.org>
Tue, 31 Jul 2018 20:55:57 +0000 (17:55 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 17 Sep 2018 11:17:25 +0000 (21:17 +1000)
commit693b31b2fc1636f0aa7af53136d3b49f6ad9ff39
tree386cfb52c1a557edf98f4e9c4f7d0970ade79e10
parentb0dc0f8618e87f1b2c7f04b977fda16e961bbec1
powerpc/selftests: Wait all threads to join

Test tm-tmspr might exit before all threads stop executing, because it just
waits for the very last thread to join before proceeding/exiting.

This patch makes sure that all threads that were created will join before
proceeding/exiting.

This patch also guarantees that the amount of threads being created is equal
to thread_num.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/tm/tm-tmspr.c