[PATCH] tests/intel/xe_create: Isolate performance tests
Balasubramani Vivekanandan
balasubramani.vivekanandan at intel.com
Fri Jun 7 09:49:36 UTC 2024
create_execqueues subtest is testing the time required for creating
execqueues along with testing the functionality.
Performance measurements are mostly not relevant when testing on PreSi
environments. Isolate the performance checks into new tests allowing it
to be skipped for PreSi testing.
Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
---
tests/intel/xe_create.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
index d41557c85..346c807c0 100644
--- a/tests/intel/xe_create.c
+++ b/tests/intel/xe_create.c
@@ -171,9 +171,11 @@ enum vm_count {
* @leak: destroy exec_queues in close() path
* @noleak-shared: same as noleak, but with a shared vm
* @leak-shared: same as leak, but with a shared vm
+ * @performance: Measure time required for creating execqueues
+ * @performance-shared: same as performance, but with a shared vm
*/
static void create_execqueues(int fd, enum exec_queue_destroy ed,
- enum vm_count vc)
+ enum vm_count vc, bool perf)
{
struct timespec tv = { };
uint32_t num_engines, exec_queues_per_process, vm;
@@ -237,10 +239,12 @@ static void create_execqueues(int fd, enum exec_queue_destroy ed,
drm_close_driver(fd);
}
- seconds = igt_seconds_elapsed(&tv);
- igt_assert_f(seconds < real_timeout,
- "Creating %d exec_queues tooks too long: %d [limit: %d]\n",
- MAXEXECQUEUES, seconds, real_timeout);
+ if (perf) {
+ seconds = igt_seconds_elapsed(&tv);
+ igt_assert_f(seconds < real_timeout,
+ "Creating %d exec_queues tooks too long: %d [limit: %d]\n",
+ MAXEXECQUEUES, seconds, real_timeout);
+ }
}
/**
@@ -410,16 +414,22 @@ igt_main_args("Q:p:", NULL, help_str, opt_handler, NULL)
}
igt_subtest("create-execqueues-noleak")
- create_execqueues(xe, NOLEAK, MULTI);
+ create_execqueues(xe, NOLEAK, MULTI, false);
igt_subtest("create-execqueues-leak")
- create_execqueues(xe, LEAK, MULTI);
+ create_execqueues(xe, LEAK, MULTI, false);
igt_subtest("create-execqueues-noleak-shared")
- create_execqueues(xe, NOLEAK, SHARED);
+ create_execqueues(xe, NOLEAK, SHARED, false);
igt_subtest("create-execqueues-leak-shared")
- create_execqueues(xe, LEAK, SHARED);
+ create_execqueues(xe, LEAK, SHARED, false);
+
+ igt_subtest("create-execqueues-performance")
+ create_execqueues(xe, NOLEAK, MULTI, true);
+
+ igt_subtest("create-execqueues-performance-shared")
+ create_execqueues(xe, NOLEAK, SHARED, true);
igt_subtest("create-massive-size") {
create_massive_size(xe);
--
2.25.1
More information about the igt-dev
mailing list