All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-gfx] [PATCH i-g-t] tests/i915_pm_rps: Fix test after silent conflict harder
Date: Tue, 18 Jul 2023 09:40:41 +0100	[thread overview]
Message-ID: <20230718084041.871888-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Feature test also needs adjusting after sysfs helper API changes...

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: d86ca7e17b58 ("tests/i915_pm_rps: Exercise sysfs thresholds")
Reference: 54dc25efaf10 ("lib/igt_sysfs: add asserting helpers for read/write operations")
Reference: 1dfa7a007a8e ("tests/i915_pm_rps: Fix test after silent conflict")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/i915/i915_pm_rps.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index 15c74cc703c2..3ef5842dd7f8 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -1015,20 +1015,23 @@ static void sysfs_set_u32(int dir, const char *attr, uint32_t set)
 static void test_thresholds(int i915, unsigned int gt, unsigned int flags)
 {
 	uint64_t ahnd = get_reloc_ahnd(i915, 0);
+	unsigned int def_up = 0, def_down = 0;
 	const unsigned int points = 10;
-	unsigned int def_up, def_down;
 	igt_spin_t *spin = NULL;
 	const intel_ctx_t *ctx;
 	unsigned int *ta, *tb;
 	unsigned int i;
 	int sysfs;
+	bool ret;
 
 	sysfs = igt_sysfs_gt_open(i915, gt);
 	igt_require(sysfs >= 0);
 
 	/* Feature test */
-	def_up = igt_sysfs_get_u32(sysfs, "rps_up_threshold_pct");
-	def_down = igt_sysfs_get_u32(sysfs, "rps_down_threshold_pct");
+	ret = __igt_sysfs_get_u32(sysfs, "rps_up_threshold_pct", &def_up);
+	igt_require(ret);
+	ret = __igt_sysfs_get_u32(sysfs, "rps_down_threshold_pct", &def_down);
+	igt_require(ret);
 	igt_require(def_up && def_down);
 
 	/* Check invalid percentages are rejected */
-- 
2.39.2


WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/i915_pm_rps: Fix test after silent conflict harder
Date: Tue, 18 Jul 2023 09:40:41 +0100	[thread overview]
Message-ID: <20230718084041.871888-1-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Feature test also needs adjusting after sysfs helper API changes...

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: d86ca7e17b58 ("tests/i915_pm_rps: Exercise sysfs thresholds")
Reference: 54dc25efaf10 ("lib/igt_sysfs: add asserting helpers for read/write operations")
Reference: 1dfa7a007a8e ("tests/i915_pm_rps: Fix test after silent conflict")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 tests/i915/i915_pm_rps.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index 15c74cc703c2..3ef5842dd7f8 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -1015,20 +1015,23 @@ static void sysfs_set_u32(int dir, const char *attr, uint32_t set)
 static void test_thresholds(int i915, unsigned int gt, unsigned int flags)
 {
 	uint64_t ahnd = get_reloc_ahnd(i915, 0);
+	unsigned int def_up = 0, def_down = 0;
 	const unsigned int points = 10;
-	unsigned int def_up, def_down;
 	igt_spin_t *spin = NULL;
 	const intel_ctx_t *ctx;
 	unsigned int *ta, *tb;
 	unsigned int i;
 	int sysfs;
+	bool ret;
 
 	sysfs = igt_sysfs_gt_open(i915, gt);
 	igt_require(sysfs >= 0);
 
 	/* Feature test */
-	def_up = igt_sysfs_get_u32(sysfs, "rps_up_threshold_pct");
-	def_down = igt_sysfs_get_u32(sysfs, "rps_down_threshold_pct");
+	ret = __igt_sysfs_get_u32(sysfs, "rps_up_threshold_pct", &def_up);
+	igt_require(ret);
+	ret = __igt_sysfs_get_u32(sysfs, "rps_down_threshold_pct", &def_down);
+	igt_require(ret);
 	igt_require(def_up && def_down);
 
 	/* Check invalid percentages are rejected */
-- 
2.39.2

             reply	other threads:[~2023-07-18  8:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  8:40 Tvrtko Ursulin [this message]
2023-07-18  8:40 ` [igt-dev] [PATCH i-g-t] tests/i915_pm_rps: Fix test after silent conflict harder Tvrtko Ursulin
2023-07-18 10:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-07-18 10:45 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-18 14:17 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2023-07-18 18:37 ` [Intel-gfx] [PATCH i-g-t] " Dixit, Ashutosh
2023-07-18 18:37   ` [igt-dev] " Dixit, Ashutosh
2023-07-19  8:07   ` [Intel-gfx] " Tvrtko Ursulin
2023-07-19  8:07     ` [igt-dev] " Tvrtko Ursulin
2023-07-18 18:41 ` [Intel-gfx] " Rodrigo Vivi
2023-07-18 18:41   ` Rodrigo Vivi

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=20230718084041.871888-1-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.