From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_debugfs: Get gt subtest passing
Date: Fri, 24 Mar 2023 07:00:06 +0100 [thread overview]
Message-ID: <20230324070006.1dd0e60c@maurocar-mobl2> (raw)
In-Reply-To: <20230324050237.2510-1-niranjana.vishwanathapura@intel.com>
On Thu, 23 Mar 2023 22:02:37 -0700
Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> wrote:
> Get gt subtest passing by properly getting and using
> xe device config info.
>
> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
LGTM.
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);
> }
> }
next prev parent reply other threads:[~2023-03-24 6:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-03-24 6:22 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-03-24 12:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-03-28 5:04 [igt-dev] [PATCH i-g-t] " Niranjana Vishwanathapura
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=20230324070006.1dd0e60c@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=niranjana.vishwanathapura@intel.com \
/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