From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Riana Tauro <riana.tauro@intel.com>
Cc: igt-dev@lists.freedesktop.org,
Petri Latvala <petri.latvala@intel.com>,
badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t 1/1] tests/debugfs_test: Add basic-hwmon test
Date: Mon, 31 Oct 2022 08:14:35 -0700 [thread overview]
Message-ID: <877d0gdnz8.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20221031095521.3749655-2-riana.tauro@intel.com>
On Mon, 31 Oct 2022 02:55:21 -0700, Riana Tauro wrote:
>
> Add a testcase that verifies hwmon directory in dgfx and prints all
> the entries
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
> tests/debugfs_test.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
> index 0b4b6e23..99fef354 100644
> --- a/tests/debugfs_test.c
> +++ b/tests/debugfs_test.c
> @@ -24,12 +24,13 @@
>
> #include "i915/gem.h"
> #include "igt.h"
> +#include "igt_hwmon.h"
> #include "igt_sysfs.h"
> #include <fcntl.h>
> #include <sys/types.h>
> #include <dirent.h>
>
> -IGT_TEST_DESCRIPTION("Read entries from debugfs and sysfs paths.");
> +IGT_TEST_DESCRIPTION("Read entries from debugfs,hwmon and sysfs paths.");
^
Space here ----------------------------------------|
Do we also need to add this test to fast_feedback testlist to add to BAT as
some people are asking? Not sure what the procedure for adding to BAT
testlist is? Let's ask Petri.
Thanks.
--
Ashutosh
>
> static void read_and_discard_sysfs_entries(int path_fd, int indent)
> {
> @@ -178,7 +179,7 @@ retry:
>
> igt_main
> {
> - int fd = -1, debugfs, sysfs;
> + int fd = -1, debugfs, sysfs, hwmon_fd;
>
> igt_fixture {
> fd = drm_open_driver_master(DRIVER_INTEL);
> @@ -196,6 +197,15 @@ igt_main
> igt_subtest("read_all_entries")
> read_and_discard_sysfs_entries(debugfs, 0);
>
> + igt_describe("Read all entries from hwmon path");
> + igt_subtest("basic-hwmon") {
> + igt_require_f(gem_has_lmem(fd), "Test applicable only for dgfx\n");
> + hwmon_fd = igt_hwmon_open(fd);
> + igt_assert(hwmon_fd >= 0);
> + read_and_discard_sysfs_entries(hwmon_fd, 0);
> + close(hwmon_fd);
> + }
> +
> igt_describe("Read all debugfs entries with display on/off.");
> igt_subtest_group
> kms_tests(fd, debugfs);
> --
> 2.25.1
>
next prev parent reply other threads:[~2022-10-31 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 9:55 [igt-dev] [PATCH i-g-t 0/1] Add a basic hwmon testcase Riana Tauro
2022-10-31 9:55 ` [igt-dev] [PATCH i-g-t 1/1] tests/debugfs_test: Add basic-hwmon test Riana Tauro
2022-10-31 10:08 ` Gupta, Anshuman
2022-10-31 15:14 ` Dixit, Ashutosh [this message]
2022-10-31 15:21 ` Petri Latvala
2022-10-31 11:09 ` [igt-dev] ✓ Fi.CI.BAT: success for Add a basic hwmon testcase Patchwork
2022-10-31 13:01 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=877d0gdnz8.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=riana.tauro@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