From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org,
Isabella Basso <isabbasso@riseup.net>,
intel-xe@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t v3 17/17] lib/kunit: Omit suite name prefix if the same as subtest name
Date: Tue, 19 Sep 2023 08:36:06 +0200 [thread overview]
Message-ID: <20230919083606.2903010a@maurocar-mobl2> (raw)
In-Reply-To: <20230918134249.31645-36-janusz.krzysztofik@linux.intel.com>
On Mon, 18 Sep 2023 15:43:07 +0200
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> wrote:
> Kunit test modules usually contain one test suite, named after the module
> name with the trailing "_test" or "_kunit" suffix omitted. Since we
> follow the same convention when we derive subtest names from module names,
> there is a great chance that those two names match. Take this into
> account when composing names for IGT dynamic sub-subtest names and drop
> the leading test suite name component when it is the same as subtest name.
>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> lib/igt_kmod.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> index f6e0ab07ce..05c837031c 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -863,7 +863,8 @@ static void kunit_result_free(struct igt_ktap_result *r,
> *
> * Returns: IGT default codes
> */
> -static void __igt_kunit(struct igt_ktest *tst, const char *opts)
> +static void
> +__igt_kunit(struct igt_ktest *tst, const char *name, const char *opts)
> {
> struct modprobe_data modprobe = { pthread_self(), tst->kmod, opts, 0,
> PTHREAD_MUTEX_INITIALIZER, };
> @@ -902,7 +903,11 @@ static void __igt_kunit(struct igt_ktest *tst, const char *opts)
>
> r = igt_list_first_entry(&results, r, link);
>
> - igt_dynamic_f("%s-%s", r->suite_name, r->case_name) {
> + igt_dynamic_f("%s%s%s",
> + strcmp(r->suite_name, name) ? r->suite_name : "",
> + strcmp(r->suite_name, name) ? "-" : "",
> + r->case_name) {
> +
> if (r->code == IGT_EXIT_INVALID) {
> /* parametrized test case, get actual result */
> kunit_result_free(r, &suite_name, &case_name);
> @@ -1011,7 +1016,7 @@ void igt_kunit(const char *module_name, const char *name, const char *opts)
> * and for documentation.
> */
> igt_subtest_with_dynamic(name)
> - __igt_kunit(&tst, opts);
> + __igt_kunit(&tst, name, opts);
>
> igt_fixture
> igt_ktest_end(&tst);
next prev parent reply other threads:[~2023-09-19 6:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 13:42 [igt-dev] [PATCH i-g-t v3 00/17] Fix IGT Kunit implementation issues Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 01/17] lib/kunit: Drop unused file stream Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 02/17] lib/kunit: Stop loading kunit module explicitly Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 04/17] lib/kunit: Optimize calls to igt_success/skip/fail() Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body Janusz Krzysztofik
2023-09-19 6:25 ` [igt-dev] [Intel-gfx] " Mauro Carvalho Chehab
2023-09-19 6:26 ` Mauro Carvalho Chehab
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 06/17] lib/ktap: Make sure we fail on premature cancel Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 07/17] lib/ktap: Drop checks for EINTR on read() failures Janusz Krzysztofik
2023-09-19 6:30 ` [igt-dev] [Intel-gfx] " Mauro Carvalho Chehab
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 08/17] lib/kunit: Cancel KTP parser on module load failure Janusz Krzysztofik
2023-09-18 13:42 ` [igt-dev] [PATCH i-g-t v3 09/17] lib/ktap: Drop is_running flag Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 10/17] lib/ktap: Read /dev/kmsg in blocking mode Janusz Krzysztofik
2023-09-19 6:23 ` [igt-dev] [Intel-gfx] " Mauro Carvalho Chehab
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 11/17] lib/kunit: Fail / skip on kernel taint Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 12/17] lib/ktap: Use IGT linked lists for storing KTAP results Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 13/17] lib/ktap: Reimplement KTAP parser Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 14/17] lib/kunit: Load test modules in background Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 15/17] lib/kunit: Parse KTAP report from the main process thread Janusz Krzysztofik
2023-09-20 18:05 ` [igt-dev] [Intel-gfx] " Mauro Carvalho Chehab
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names Janusz Krzysztofik
2023-09-18 13:43 ` [igt-dev] [PATCH i-g-t v3 17/17] lib/kunit: Omit suite name prefix if the same as subtest name Janusz Krzysztofik
2023-09-19 6:36 ` Mauro Carvalho Chehab [this message]
2023-09-18 20:24 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix IGT Kunit implementation issues (rev3) Patchwork
2023-09-18 20:58 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-09-19 23:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-20 9:44 ` Janusz Krzysztofik
2023-09-21 5:20 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
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=20230919083606.2903010a@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=isabbasso@riseup.net \
--cc=janusz.krzysztofik@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox