From: Badal Nilawar <badal.nilawar@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2] tests/intel/hwmon: Scale hwmon tests to support xe kmd
Date: Mon, 18 Sep 2023 11:52:48 +0530 [thread overview]
Message-ID: <20230918062248.3109570-1-badal.nilawar@intel.com> (raw)
Scale hwmon tests to support xe kmd
v2: s/||/&& [Riana]
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
lib/igt_hwmon.c | 5 ++++-
tests/intel/{i915_hwmon.c => intel_hwmon.c} | 10 +++++-----
tests/meson.build | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
rename tests/intel/{i915_hwmon.c => intel_hwmon.c} (89%)
diff --git a/lib/igt_hwmon.c b/lib/igt_hwmon.c
index 309019d69..f37ced2d9 100644
--- a/lib/igt_hwmon.c
+++ b/lib/igt_hwmon.c
@@ -66,7 +66,10 @@ int igt_hwmon_open(int device)
{
char path[PATH_MAX];
- if (!is_i915_device(device) || !igt_hwmon_path(device, path, "i915"))
+ if (!is_intel_device(device))
+ return -1;
+
+ if (!igt_hwmon_path(device, path, "i915") && !igt_hwmon_path(device, path, "xe"))
return -1;
return open(path, O_RDONLY);
diff --git a/tests/intel/i915_hwmon.c b/tests/intel/intel_hwmon.c
similarity index 89%
rename from tests/intel/i915_hwmon.c
rename to tests/intel/intel_hwmon.c
index 48ed9f3b7..1cc9cd399 100644
--- a/tests/intel/i915_hwmon.c
+++ b/tests/intel/intel_hwmon.c
@@ -9,11 +9,11 @@
#include "igt_hwmon.h"
#include "igt_sysfs.h"
/**
- * TEST: i915 hwmon
- * Description: Tests for i915 hwmon
+ * TEST: intel hwmon
+ * Description: Tests for intel hwmon
* Feature: hwmon
* Run type: FULL
- * Test category: GEM_Legacy
+ * Test category: functionality
*
* SUBTEST: hwmon-read
* Description: Verify we can read all hwmon attributes
@@ -22,7 +22,7 @@
* Description: Verify writable hwmon attributes
*/
-IGT_TEST_DESCRIPTION("Tests for i915 hwmon");
+IGT_TEST_DESCRIPTION("Tests for intel hwmon");
static void hwmon_read(int hwm)
{
@@ -79,7 +79,7 @@ igt_main
int fd, hwm;
igt_fixture {
- fd = drm_open_driver_master(DRIVER_INTEL);
+ fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
hwm = igt_hwmon_open(fd);
igt_require(hwm >= 0);
}
diff --git a/tests/meson.build b/tests/meson.build
index 31492bf7b..cf5c8a2fa 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -84,6 +84,7 @@ test_progs = [
intel_i915_xe_progs = [
'api_intel_allocator',
+ 'intel_hwmon',
]
intel_i915_progs = [
@@ -218,7 +219,6 @@ intel_i915_progs = [
'i915_getparams_basic',
'i915_pm_freq_api',
'i915_hangman',
- 'i915_hwmon',
'i915_module_load',
'i915_pciid',
'i915_pipe_stress',
--
2.25.1
next reply other threads:[~2023-09-18 6:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 6:22 Badal Nilawar [this message]
2023-09-18 6:19 ` [igt-dev] [PATCH i-g-t v2] tests/intel/hwmon: Scale hwmon tests to support xe kmd Riana Tauro
2023-09-18 10:34 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/intel/hwmon: Scale hwmon tests to support xe kmd (rev2) Patchwork
2023-09-18 11:16 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-09-19 11:58 ` [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=20230918062248.3109570-1-badal.nilawar@intel.com \
--to=badal.nilawar@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