Re: [RFC 1/1] selftests/bpf: Add parallelism to test_progs
From: sunyucong@gmail.com <hidden>
Date: 2021-08-31 12:30:14
On Mon, Aug 30, 2021 at 11:37 PM Andrii Nakryiko [off-list ref] wrote:
On Fri, Aug 27, 2021 at 4:13 PM Yucong Sun [off-list ref] wrote:quoted
From: Yucong Sun <redacted> This patch adds "-p" parameter to test_progs, which will spawn workers and distribute tests evenly among all workers, speeding up execution.make and pahole use -j for parallelism, let's use the same for familiarity? pahole (make gives a bad example in this regard) is using a good convention that if no number of workers is provided with -j, it assumes number of CPUs. I think that's a good default, let's do that as well.
Ack, with the new server/worker model it would definitely make sense.
quoted
"-p" mode is optional, and works with all existing test selection mechanism, including "-l". Each worker print its own summary and exit with its own status, the main process will collect all status together and exit with a overall status.Signed-off-by: is missing, don't forget about it.
Ack!
quoted
--- tools/testing/selftests/bpf/test_progs.c | 94 ++++++++++++++++++++++-- tools/testing/selftests/bpf/test_progs.h | 3 + 2 files changed, 91 insertions(+), 6 deletions(-)I'll add high-level comments on the cover letter (which single patch submissions don't really need, cover letter is required only for patch sets with more than one patch; no big deal, but keep this in mind).
Got it!