From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id D1E7F10E53B for ; Wed, 27 Sep 2023 14:35:00 +0000 (UTC) From: Kamil Konieczny To: igt-dev@lists.freedesktop.org Date: Wed, 27 Sep 2023 16:34:44 +0200 Message-ID: <20230927143444.76363-3-kamil.konieczny@linux.intel.com> In-Reply-To: <20230927143444.76363-1-kamil.konieczny@linux.intel.com> References: <20230927143444.76363-1-kamil.konieczny@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v4 2/2] tests/intel/xe_create: extend massive subtest to multi-gpu List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Sample code extends existing create-massive-size subtest to run on multi-GPUs boards. This will currently work only with --drivers or IGT_DRIVERS options selecting at least two dGPU cards. v2: Fixed bug in opening wrong multi-gpu device (Zbigniew) v3: revert to use filter count, add require for xe, change subtest description v4: correct description Cc: Zbigniew KempczyƄski Signed-off-by: Kamil Konieczny --- tests/intel/xe_create.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c index 8d845e5c8..ee970450f 100644 --- a/tests/intel/xe_create.c +++ b/tests/intel/xe_create.c @@ -12,6 +12,7 @@ #include #include "igt.h" +#include "igt_device_scan.h" #include "xe_drm.h" #include "xe/xe_ioctl.h" #include "xe/xe_query.h" @@ -191,6 +192,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 +236,23 @@ igt_main create_massive_size(xe); } + igt_subtest("multigpu-create-massive-size") { + int gpu_filter_count = igt_device_filter_count(); + + igt_require(xe > 0); + igt_require(gpu_filter_count >= 2); + igt_multi_fork(child, gpu_filter_count) { + int gpu_fd; + + gpu_fd = child ? __drm_open_driver_another(child, DRIVER_XE) : drm_reopen_driver(xe); + igt_assert_f(gpu_fd > 0, "cannot open gpu-%d, errno=%d\n", child, errno); + + create_massive_size(gpu_fd); + drm_close_driver(gpu_fd); + } + igt_waitchildren(); + } + igt_fixture drm_close_driver(xe); } -- 2.42.0