From: Kamil Konieczny <kamil.konieczny@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t v2 2/5] tests/prime_udl: Create subtests
Date: Wed, 22 Apr 2026 17:44:20 +0200 [thread overview]
Message-ID: <20260422154423.141908-3-kamil.konieczny@linux.intel.com> (raw)
In-Reply-To: <20260422154423.141908-1-kamil.konieczny@linux.intel.com>
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>
---
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);
+ }
}
--
2.54.0
next prev parent reply other threads:[~2026-04-22 15:44 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 ` Kamil Konieczny [this message]
2026-04-23 10:25 ` [PATCH i-g-t v2 2/5] tests/prime_udl: Create subtests Karthik B S
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=20260422154423.141908-3-kamil.konieczny@linux.intel.com \
--to=kamil.konieczny@linux.intel.com \
--cc=igt-dev@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox