selftests/nolibc: support a test definition format
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 21:44:36 +0000 (23:44 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:17:44 +0000 (05:17 -0700)
commit23da7bc923609bc90b6989c6c6a17e74c8f433ed
tree52988c748cc69ff41f269bf01b22b6cbc71cc597
parent362aecb2d8cfad0268d6c0ae5f448e9b6eee7ffb
selftests/nolibc: support a test definition format

It now becomes possible to pass a string either in argv[1] or in the
NOLIBC_TEST environment variable (the former having precedence), to
specify which tests to run. The format is:

   testname[:range]*[,testname...]

Where a range is either a single value or the min and max numbers of the
test IDs in a sequence, delimited by a dash. Multiple ranges are possible.
This should provide enough flexibility to focus on certain failing parts
just by playing with the boot command line in a boot loader or in qemu
depending on what is accessible.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/nolibc/nolibc-test.c