OSDN Git Service

wireguard: selftests: limit parallelism to $(nproc) tests at once
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 4 May 2022 20:29:16 +0000 (22:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 May 2022 00:49:56 +0000 (17:49 -0700)
commit39f02bf1e5ce9d72045de01e3d618ade1067158c
tree2afa140baf6df5550e282a27db83f0ce6cc602c7
parentae2de669c14a18b5144cdacf49933ad400ed7e1c
wireguard: selftests: limit parallelism to $(nproc) tests at once

The parallel tests were added to catch queueing issues from multiple
cores. But what happens in reality when testing tons of processes is
that these separate threads wind up fighting with the scheduler, and we
wind up with contention in places we don't care about that decrease the
chances of hitting a bug. So just do a test with the number of CPU
cores, rather than trying to scale up arbitrarily.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/wireguard/netns.sh