Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <matthew.d.roper@intel.com>, Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [PATCH] drm/xe/kunit: Fix forcewake assertion in mocs test
Date: Fri, 14 Nov 2025 08:45:09 -0300	[thread overview]
Message-ID: <176312070974.3698.10963254726498831946@intel.com> (raw)
In-Reply-To: <20251113234038.2256106-2-matthew.d.roper@intel.com>

Quoting Matt Roper (2025-11-13 20:40:39-03:00)
>The MOCS kunit test calls KUNIT_ASSERT_TRUE_MSG() with a condition of
>'true;' this prevents the assertion from ever failing.  Replace
>KUNIT_ASSERT_TRUE_MSG with KUNIT_FAIL_AND_ABORT to get the intended
>failure behavior in cases where forcewake was not acquired successfully.
>
>Fixes: 51c0ee84e4dc ("drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs")
>Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
>Cc: Gustavo Sousa <gustavo.sousa@intel.com>
>Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

>---
> drivers/gpu/drm/xe/tests/xe_mocs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_mocs.c b/drivers/gpu/drm/xe/tests/xe_mocs.c
>index 0e502feaca81..6bb278167aaf 100644
>--- a/drivers/gpu/drm/xe/tests/xe_mocs.c
>+++ b/drivers/gpu/drm/xe/tests/xe_mocs.c
>@@ -49,7 +49,7 @@ static void read_l3cc_table(struct xe_gt *gt,
>         fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
>         if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
>                 xe_force_wake_put(gt_to_fw(gt), fw_ref);
>-                KUNIT_ASSERT_TRUE_MSG(test, true, "Forcewake Failed.\n");
>+                KUNIT_FAIL_AND_ABORT(test, "Forcewake Failed.\n");
>         }
> 
>         for (i = 0; i < info->num_mocs_regs; i++) {
>-- 
>2.51.1
>

  parent reply	other threads:[~2025-11-14 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13 23:40 [PATCH] drm/xe/kunit: Fix forcewake assertion in mocs test Matt Roper
2025-11-13 23:50 ` ✓ CI.KUnit: success for " Patchwork
2025-11-14  0:41 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-14 10:02 ` ✓ Xe.CI.Full: " Patchwork
2025-11-14 16:56   ` Matt Roper
2025-11-14 11:45 ` Gustavo Sousa [this message]
2025-11-14 16:39 ` [PATCH] " Lucas De Marchi
2025-11-17  6:41   ` Upadhyay, Tejas

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=176312070974.3698.10963254726498831946@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=tejas.upadhyay@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