All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Jonathan Cavitt <jonathan.cavitt@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH i-g-t v3 5/5] lib/kunit: Minimize code duplication
Date: Mon, 25 Mar 2024 18:12:42 +0100	[thread overview]
Message-ID: <20240325171242.yze6pcimo2awa4iu@kamilkon-desk.igk.intel.com> (raw)
In-Reply-To: <20240318103534.701693-12-janusz.krzysztofik@linux.intel.com>

Hi Janusz,
On 2024-03-18 at 11:13:31 +0100, Janusz Krzysztofik wrote:
> A new helper has been introduced recently, used for fetching KTAP results
> of a single test case.  Since that helper is called for that purpose
> only after the test module is loaded with all other test cases filtered
> out, its actual implementation is as simple as collecting all results from
> a single KTAP report, no matter how many test suites and test cases it
> covers.  Then, it's a good candidate for reuse in other scenarios when a
> single KTAP report is handled, e.g., when we collect a list of test cases
> from a single test suite or test module.  Go for it.
> 
> v3: Rebased on top of changes to struct igt_ktap_results pointer handling.
> v2: Rebased on invalid test suite name workaround.
> 
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

> ---
>  lib/igt_kmod.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> index c495d11b16..8979a5928b 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -1262,21 +1262,14 @@ static bool kunit_get_tests(struct igt_list_head *tests,
>  	igt_skip_on(modprobe(tst->kmod, opts));
>  	igt_skip_on(igt_kernel_tainted(&taints));
>  
> -	*ktap = igt_ktap_alloc(tests);
> -	igt_require(*ktap);
> -
>  	igt_skip_on(sigaction(SIGALRM, &sigalrm, saved));
>  	alarm(10);
>  
> -	do
> -		err = kunit_kmsg_result_get(tests, NULL, tst->kmsg, *ktap);
> -	while (err == -EINPROGRESS);
> +	err = kunit_get_results(tests, tst->kmsg, ktap);
>  
>  	alarm(0);
>  	igt_debug_on(sigaction(SIGALRM, saved, NULL));
>  
> -	igt_ktap_free(ktap);
> -
>  	igt_skip_on_f(err,
>  		      "KTAP parser failed while getting a list of test cases\n");
>  
> -- 
> 2.43.0
> 

  reply	other threads:[~2024-03-25 17:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 10:13 [PATCH i-g-t v3 0/5] lib/kunit: Execute test cases synchronously Janusz Krzysztofik
2024-03-18 10:13 ` [PATCH i-g-t v3 1/5] lib/kunit: Store igt_ktap_results pointer in a central location Janusz Krzysztofik
2024-03-19 18:25   ` Kamil Konieczny
2024-03-18 10:13 ` [PATCH i-g-t v3 2/5] lib/kunit: Let igt_ktap_free() take care of pointer reset Janusz Krzysztofik
2024-03-19 18:30   ` Kamil Konieczny
2024-03-18 10:13 ` [PATCH i-g-t v3 3/5] lib/kunit: Time out promptly on missing KTAP report Janusz Krzysztofik
2024-03-19 18:33   ` Kamil Konieczny
2024-03-18 10:13 ` [PATCH i-g-t v3 4/5] lib/kunit: Execute test cases synchronously Janusz Krzysztofik
2024-03-25 17:04   ` Kamil Konieczny
2024-03-18 10:13 ` [PATCH i-g-t v3 5/5] lib/kunit: Minimize code duplication Janusz Krzysztofik
2024-03-25 17:12   ` Kamil Konieczny [this message]
2024-03-18 17:21 ` ✗ CI.Patch_applied: failure for lib/kunit: Execute test cases synchronously (rev3) Patchwork
2024-03-18 17:59 ` ✓ CI.xeBAT: success for lib/kunit: Execute test cases synchronously (rev6) Patchwork
2024-03-18 18:10 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-18 23:28 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-19 18:39 ` [PATCH i-g-t v3 0/5] lib/kunit: Execute test cases synchronously Cavitt, Jonathan

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=20240325171242.yze6pcimo2awa4iu@kamilkon-desk.igk.intel.com \
    --to=kamil.konieczny@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=janusz.krzysztofik@linux.intel.com \
    --cc=jonathan.cavitt@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=mchehab@kernel.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.