From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/xe/xe_debugfs: Get gt subtest passing
Date: Mon, 27 Mar 2023 22:04:49 -0700 [thread overview]
Message-ID: <20230328050449.21706-1-niranjana.vishwanathapura@intel.com> (raw)
Get gt subtest passing by properly getting and using
xe device config info.
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
tests/xe/xe_debugfs.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tests/xe/xe_debugfs.c b/tests/xe/xe_debugfs.c
index ad6191fbc..6bdd3ef06 100644
--- a/tests/xe/xe_debugfs.c
+++ b/tests/xe/xe_debugfs.c
@@ -71,7 +71,7 @@ static int validate_entries(int fd, const char *add_path, const char * const str
* Description: Check if various debugfs devnodes exist and test reading them.
*/
static void
-test_base(int fd)
+test_base(int fd, struct drm_xe_query_config *config)
{
static const char * const expected_files[] = {
"gt0",
@@ -88,8 +88,6 @@ test_base(int fd)
char reference[4096];
int val = 0;
- struct xe_device *xe_dev = xe_device_get(fd);
- struct drm_xe_query_config *config = xe_dev->config;
igt_assert(config);
sprintf(reference, "devid 0x%llx",
@@ -145,8 +143,6 @@ test_base(int fd)
igt_debugfs_dump(fd, "gem_names");
validate_entries(fd, "", expected_files, ARRAY_SIZE(expected_files));
-
- xe_device_put(fd);
}
/**
@@ -244,17 +240,19 @@ static int opt_handler(int option, int option_index, void *input)
igt_main_args("", long_options, help_str, opt_handler, NULL)
{
+ struct xe_device *xe_dev;
char devnode[PATH_MAX];
int fd;
int gt;
igt_fixture {
fd = drm_open_driver(DRIVER_XE);
+ xe_dev = xe_device_get(fd);
__igt_debugfs_dump(fd, "info", IGT_LOG_INFO);
}
igt_subtest("base") {
- test_base(fd);
+ test_base(fd, xe_dev->config);
}
@@ -271,6 +269,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
}
igt_fixture {
+ xe_device_put(fd);
close(fd);
}
}
--
2.21.0.rc0.32.g243a4c7e27
next reply other threads:[~2023-03-28 5:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 5:04 Niranjana Vishwanathapura [this message]
2023-03-28 5:40 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/xe/xe_debugfs: Get gt subtest passing (rev2) Patchwork
2023-03-28 13:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-03-24 5:02 [igt-dev] [PATCH i-g-t] tests/xe/xe_debugfs: Get gt subtest passing Niranjana Vishwanathapura
2023-03-24 6:00 ` Mauro Carvalho Chehab
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=20230328050449.21706-1-niranjana.vishwanathapura@intel.com \
--to=niranjana.vishwanathapura@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