On Wed, Jul 1, 2020 at 2:44 PM Jesper Dangaard Brouer <brouer@xxxxxxxxxx> wrote: > > It can be practial to get the number of tests that test_progs contain. > This could for example be used to create a shell for-loop construct that > runs the individual tests. > > Like: > for N in $(seq 1 $(./test_progs -c)); do > ./test_progs -n $N 2>&1 > result_test_${N}.log & > done ; wait > > V2: Add the ability to return the count for the selected tests. This is > useful for getting a count e.g. after excluding some tests with option -b. > The current beakers test script like to report the max test count upfront. > > Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx> > --- Acked-by: Andrii Nakryiko <andriin@xxxxxx> > tools/testing/selftests/bpf/test_progs.c | 18 ++++++++++++++++++ > tools/testing/selftests/bpf/test_progs.h | 1 + > 2 files changed, 19 insertions(+) > [...]