[igt-dev] [PATCH i-g-t v2 3/3] tests/intel/xe_create: add multi-GPU basic test
Kamil Konieczny
kamil.konieczny at linux.intel.com
Fri Nov 3 16:01:47 UTC 2023
Add basic multi-GPU test using drm filtered helpers.
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
v2: use new helper
---
tests/intel/xe_create.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
index d99bd51cf..ac5418ef2 100644
--- a/tests/intel/xe_create.c
+++ b/tests/intel/xe_create.c
@@ -191,6 +191,13 @@ static void create_execqueues(int fd, enum exec_queue_destroy ed)
* Test category: functionality test
* Description: Verifies xe bo create returns expected error code on massive
* buffer sizes.
+ *
+ * SUBTEST: multigpu-create-massive-size
+ * Functionality: ioctl
+ * Test category: functionality test
+ * Feature: multigpu
+ * Description: Verifies xe bo create with massive buffer sizes runs correctly
+ * on two or more GPUs.
*/
static void create_massive_size(int fd)
{
@@ -228,6 +235,25 @@ igt_main
create_massive_size(xe);
}
+ igt_subtest("multigpu-create-massive-size") {
+ int gpu_count = drm_prepare_filtered_multigpu(DRIVER_XE);
+
+ igt_require(xe > 0);
+ igt_require(gpu_count >= 2);
+ igt_multi_fork(child, gpu_count) {
+ int gpu_fd;
+
+ gpu_fd = drm_open_filtered_card(child);
+ igt_assert_f(gpu_fd > 0, "cannot open gpu-%d, errno=%d\n", child, errno);
+ igt_assert(is_xe_device(gpu_fd));
+
+ create_massive_size(gpu_fd);
+ drm_close_driver(gpu_fd);
+ }
+ igt_waitchildren();
+ }
+
+
igt_fixture
drm_close_driver(xe);
}
--
2.42.0
More information about the igt-dev
mailing list