public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v2 2/5] tests/prime_udl: Create subtests
Date: Thu, 23 Apr 2026 15:55:56 +0530	[thread overview]
Message-ID: <c5578fc4-f8ae-4260-a884-2264252d6e8c@intel.com> (raw)
In-Reply-To: <20260422154423.141908-3-kamil.konieczny@linux.intel.com>


On 4/22/2026 9:14 PM, Kamil Konieczny wrote:
> Refactor code and create opening fixture, subtests and cleanup
> fixture.
>
> v2: use igt_main() with igt_fixture() (Kamil)
>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
>   tests/prime_udl.c | 23 ++++++++++++++---------
>   1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/tests/prime_udl.c b/tests/prime_udl.c
> index c3e92be1e..b1524e6de 100644
> --- a/tests/prime_udl.c
> +++ b/tests/prime_udl.c
> @@ -121,18 +121,23 @@ static void test2(void)
>   	gem_close(intel_fd, intel_handle);
>   }
>   
> -int igt_simple_main()
> +int igt_main()
>   {
> -	igt_assert(find_and_open_devices() >= 0);
> -
> -	igt_skip_on(udl_fd == -1);
> -	igt_skip_on(intel_fd == -1);
> +	igt_fixture() {
> +		igt_assert(find_and_open_devices() >= 0);
> +		igt_skip_on(udl_fd == -1);
> +		igt_skip_on(intel_fd == -1);
> +	}
>   
>   	/* create an object on the i915 */
> -	test1();
> +	igt_subtest("share-import")
> +		test1();
>   
> -	test2();
> +	igt_subtest("share-import-addfb")
> +		test2();
>   
> -	close(intel_fd);
> -	close(udl_fd);
> +	igt_fixture() {
> +		close(intel_fd);
> +		close(udl_fd);
> +	}
>   }

  reply	other threads:[~2026-04-23 10:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-22 15:44 [PATCH i-g-t v2 0/5] Various fixes for prime_udl test Kamil Konieczny
2026-04-22 15:44 ` [PATCH i-g-t v2 1/5] tests/prime_udl: Fix opening Kamil Konieczny
2026-04-22 15:44 ` [PATCH i-g-t v2 2/5] tests/prime_udl: Create subtests Kamil Konieczny
2026-04-23 10:25   ` Karthik B S [this message]
2026-04-22 15:44 ` [PATCH i-g-t v2 3/5] tests/prime_udl: Fix error handling Kamil Konieczny
2026-04-22 15:44 ` [PATCH i-g-t v2 4/5] tests/prime_udl: Fix i915 device opening Kamil Konieczny
2026-04-22 15:44 ` [PATCH i-g-t v2 5/5] tests/prime_udl: Rename into i915_prime_udl Kamil Konieczny
2026-04-23 10:29   ` Karthik B S
2026-04-24 12:47     ` Kamil Konieczny
2026-04-27  3:43       ` Karthik B S
2026-04-22 23:00 ` ✗ i915.CI.BAT: failure for Various fixes for prime_udl test (rev3) Patchwork
2026-04-23  0:03 ` ✓ Xe.CI.BAT: success " Patchwork
2026-04-23  8:15 ` ✗ Xe.CI.FULL: failure " 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=c5578fc4-f8ae-4260-a884-2264252d6e8c@intel.com \
    --to=karthik.b.s@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@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