From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4047210E276 for ; Mon, 31 Oct 2022 15:14:36 +0000 (UTC) Date: Mon, 31 Oct 2022 08:14:35 -0700 Message-ID: <877d0gdnz8.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Riana Tauro In-Reply-To: <20221031095521.3749655-2-riana.tauro@intel.com> References: <20221031095521.3749655-1-riana.tauro@intel.com> <20221031095521.3749655-2-riana.tauro@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 1/1] tests/debugfs_test: Add basic-hwmon test List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, Petri Latvala , badal.nilawar@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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 > --- > 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 > #include > #include > > -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 >