[compiler-rt][Profile] Wait for child threads in set-file-object test
authorDavid Spickett <david.spickett@linaro.org>
Fri, 3 Sep 2021 18:48:06 +0000 (11:48 -0700)
committerZequan Wu <zequanwu@google.com>
Fri, 3 Sep 2021 18:48:50 +0000 (11:48 -0700)
commit5e50d3073a5ead122a731580ded3f1cb3c21ee54
tree44226df80c523f0dbed9fd87c6af5c8682fff455
parentd98c34f4d7950f531661ba3f498222ccf6239a0f
[compiler-rt][Profile] Wait for child threads in set-file-object test

We've been seeing this test return 31 instead of 32 for the "functions"
line in this test on our AArch64 bots.

One possible cause is some of the children not finishing in time
before the llvm-profdata commands are run, if the machine is heavily loaded.

Wait for all the children to finish before exiting the parent.

Reviewed By: zequanwu

Differential Revision: https://reviews.llvm.org/D109222
compiler-rt/test/profile/ContinuousSyncMode/set-file-object.c