From: Shuah Khan <skhan@linuxfoundation.org>
To: Jakub Kicinski <kuba@kernel.org>, shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, keescook@chromium.org,
luto@amacapital.net, wad@chromium.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] testing: kselftest_harness: add filtering and enumerating tests
Date: Thu, 26 Jan 2023 16:02:37 -0700 [thread overview]
Message-ID: <cd443a9c-e5d1-a530-0400-c2cbddb6e58a@linuxfoundation.org> (raw)
In-Reply-To: <20230125231356.1070986-1-kuba@kernel.org>
On 1/25/23 16:13, Jakub Kicinski wrote:
> As the number of test cases and length of execution grows it's
> useful to select only a subset of tests. In TLS for instance we
> have a matrix of variants for different crypto protocols and
> during development mostly care about testing a handful.
> This is quicker and makes reading output easier.
>
> This patch adds argument parsing to kselftest_harness.
>
> It supports a couple of ways to filter things, I could not come
> up with one way which will cover all cases.
>
> The first and simplest switch is -r which takes the name of
> a test to run (can be specified multiple times). For example:
>
> $ ./my_test -r some.test.name -r some.other.name
>
> will run tests some.test.name and some.other.name (where "some"
> is the fixture, "test" and "other" and "name is the test.)
>
> Then there is a handful of group filtering options. f/v/t for
> filtering by fixture/variant/test. They have both positive
> (match -> run) and negative versions (match -> skip).
> If user specifies any positive option we assume the default
> is not to run the tests. If only negative options are set
> we assume the tests are supposed to be run by default.
>
> Usage: ./tools/testing/selftests/net/tls [-h|-l] [-t|-T|-v|-V|-f|-F|-r name]
> -h print help
> -l list all tests
>
> -t name include test
> -T name exclude test
> -v name include variant
> -V name exclude variant
> -f name include fixture
> -F name exclude fixture
> -r name run specified test
>
> Test filter options can be specified multiple times. The filtering stops
> at the first match. For example to include all tests from variant 'bla'
> but not test 'foo' specify '-T foo -v bla'.
>
> Here we can request for example all tests from fixture "foo" to run:
>
> ./my_test -f foo
>
> or to skip variants var1 and var2:
>
> ./my_test -V var1 -V var2
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> v2:
> - use getopt()
>
Thank you. I applied this to linux-kselftest next for Linux 6.3-rc1
thanks,
-- Shuah
next prev parent reply other threads:[~2023-01-26 23:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 23:13 [PATCH] testing: kselftest_harness: add filtering and enumerating tests Jakub Kicinski
2023-01-26 23:02 ` Shuah Khan [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-26 22:15 Jakub Kicinski
2022-06-09 20:24 Jakub Kicinski
2022-06-09 20:59 ` Shuah Khan
2022-06-09 21:36 ` Jakub Kicinski
2022-06-09 22:35 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd443a9c-e5d1-a530-0400-c2cbddb6e58a@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=shuah@kernel.org \
--cc=wad@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.