From: sai.gowtham.ch@intel.com
To: igt-dev@lists.freedesktop.org, sai.gowtham.ch@intel.com
Subject: [PATCH 2/2] tests/intel: Adopt igt_sysfs_engines dependent tests to use query engine class
Date: Tue, 13 Aug 2024 01:11:36 +0530 [thread overview]
Message-ID: <20240812194136.6352-3-sai.gowtham.ch@intel.com> (raw)
In-Reply-To: <20240812194136.6352-1-sai.gowtham.ch@intel.com>
From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
Adopt igt_sysfs_engines denpendent tests to query engine class based on
the updated sysfs engines queried.
Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
---
tests/intel/xe_exec_queue_property.c | 7 ++++---
tests/intel/xe_sysfs_defaults.c | 5 +++--
tests/intel/xe_sysfs_scheduler.c | 10 ++++++----
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
index 3edab0af5..25a7e7abb 100644
--- a/tests/intel/xe_exec_queue_property.c
+++ b/tests/intel/xe_exec_queue_property.c
@@ -64,7 +64,8 @@ static void test_set_property(int xe, int property_name,
&exec_queue_id), err_val);
}
-static void test_property_min_max(int xe, int engine, const char **property)
+static void test_property_min_max(int xe, int engine, const char **property,
+ uint16_t class, int gt)
{
unsigned int max;
unsigned int min;
@@ -198,7 +199,7 @@ igt_main
{
static const struct {
const char *name;
- void (*fn)(int, int, const char **);
+ void (*fn)(int, int, const char **, uint16_t, int);
} tests[] = {{"property-min-max", test_property_min_max}, {} };
const char *property[][3] = { {"timeslice_duration_us", "timeslice_duration_min", "timeslice_duration_max"},
@@ -257,7 +258,7 @@ igt_main
engines_fd = openat(gt_fd, "engines", O_RDONLY);
igt_require(engines_fd != -1);
- igt_sysfs_engines(xe, engines_fd, property[i], t->fn);
+ igt_sysfs_engines(xe, engines_fd, 0, 0, property[i], t->fn);
close(engines_fd);
close(gt_fd);
}
diff --git a/tests/intel/xe_sysfs_defaults.c b/tests/intel/xe_sysfs_defaults.c
index 1777158d5..393e56651 100644
--- a/tests/intel/xe_sysfs_defaults.c
+++ b/tests/intel/xe_sysfs_defaults.c
@@ -28,7 +28,8 @@
#include "xe_drm.h"
#include "xe/xe_query.h"
-static void test_defaults(int xe, int engine, const char **property)
+static void test_defaults(int xe, int engine, const char **property,
+ uint16_t class, int gt)
{
struct dirent *de;
uint64_t property_value;
@@ -81,7 +82,7 @@ igt_main
engines_fd = openat(gt_fd, "engines", O_RDONLY);
igt_require(engines_fd != -1);
- igt_sysfs_engines(xe, engines_fd, NULL, test_defaults);
+ igt_sysfs_engines(xe, engines_fd, 0, 0, NULL, test_defaults);
close(engines_fd);
close(gt_fd);
diff --git a/tests/intel/xe_sysfs_scheduler.c b/tests/intel/xe_sysfs_scheduler.c
index 979ce95d2..947dbdbc9 100644
--- a/tests/intel/xe_sysfs_scheduler.c
+++ b/tests/intel/xe_sysfs_scheduler.c
@@ -37,7 +37,8 @@
#include "xe_drm.h"
#include "xe/xe_query.h"
-static void test_invalid(int xe, int engine, const char **property)
+static void test_invalid(int xe, int engine, const char **property,
+ uint16_t class, int gt)
{
unsigned int saved, set;
unsigned int min, max;
@@ -57,7 +58,8 @@ static void test_invalid(int xe, int engine, const char **property)
igt_assert_eq(set, saved);
}
-static void test_min_max(int xe, int engine, const char **property)
+static void test_min_max(int xe, int engine, const char **property,
+ uint16_t class, int gt)
{
unsigned int default_max, max;
unsigned int default_min, min;
@@ -113,7 +115,7 @@ igt_main
{
static const struct {
const char *name;
- void (*fn)(int, int, const char **);
+ void (*fn)(int, int, const char **, uint16_t, int);
} tests[] = {
{ "invalid", test_invalid },
{ "min-max", test_min_max },
@@ -150,7 +152,7 @@ igt_main
engines_fd = openat(gt_fd, "engines", O_RDONLY);
igt_require(engines_fd != -1);
- igt_sysfs_engines(xe, engines_fd, property[i], t->fn);
+ igt_sysfs_engines(xe, engines_fd, 0, 0, property[i], t->fn);
close(engines_fd);
close(gt_fd);
}
--
2.39.1
next prev parent reply other threads:[~2024-08-12 19:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 19:41 [PATCH 0/2]lib/igt_sysfs: update igt_sysfs_engines to run dynamic tests with its sai.gowtham.ch
2024-08-12 19:41 ` [PATCH 1/2] lib/igt_sysfs: update igt_sysfs_engines to run dynamic tests with its associated engine class sai.gowtham.ch
2024-08-13 10:12 ` Kumar, Janga Rahul
2024-08-12 19:41 ` sai.gowtham.ch [this message]
2024-08-13 10:12 ` [PATCH 2/2] tests/intel: Adopt igt_sysfs_engines dependent tests to use query " Kumar, Janga Rahul
2024-08-12 20:08 ` ✓ CI.xeBAT: success for lib/igt_sysfs: update igt_sysfs_engines to run dynamic tests with its Patchwork
2024-08-12 20:17 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-13 2:26 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-13 6:55 ` ✗ Fi.CI.IGT: " Patchwork
2024-08-13 14:06 ` Ch, Sai Gowtham
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=20240812194136.6352-3-sai.gowtham.ch@intel.com \
--to=sai.gowtham.ch@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