Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: lucas.demarchi@intel.com, John.C.Harrison@intel.com,
	sujaritha.sundaresan@intel.com, matthew.d.roper@intel.com,
	andi.shyti@linux.intel.com, igt-dev@lists.freedesktop.org,
	anshuman.gupta@intel.com, badal.nilawar@intel.com,
	riana.tauro@intel.com
Subject: Re: [PATCH i-g-t v1] tests/intel/xe_gt_freq: Change basic throttle API test criteria
Date: Wed, 6 Nov 2024 09:22:55 +0200	[thread overview]
Message-ID: <ZysZT-30AHDDjI_p@black.fi.intel.com> (raw)
In-Reply-To: <ZypDRUBurYJBd9eo@intel.com>

On Tue, Nov 05, 2024 at 11:09:41AM -0500, Rodrigo Vivi wrote:
> On Tue, Nov 05, 2024 at 12:02:28PM +0530, Raag Jadav wrote:
> > Basic throttle API test is implemented in a way that expects multiple
> > sysfs reads to provide atomic results. Since atomicity is never guaranteed
> > between multiple sysfs reads, this is an incorrect expection from the test.
> > Change the test criteria to check for boolean value from throttle status
> > and throttle reasons sysfs entries.
> > 
> > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3254
> > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3147
> > Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2810
> 
> There's clear something wrong with the 'status'....
> 
> look at this tool: https://github.com/ulissesf/qmassa
> look at the recorded example in the readme... status is poping up so much.
> that is not normal. I noticed this here as well. status is flipping to 1
> so many times while we have absolutely no one of the real reasons flipping
> to 1 as well. This is the problem that needs to be solved.

There's nothing "suspicious" that I was able to find in the driver or
the documentation. Open to suggestions.

> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > ---
> >  tests/intel/xe_gt_freq.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tests/intel/xe_gt_freq.c b/tests/intel/xe_gt_freq.c
> > index de4d111ea..632415d33 100644
> > --- a/tests/intel/xe_gt_freq.c
> > +++ b/tests/intel/xe_gt_freq.c
> > @@ -121,10 +121,8 @@ static void test_throttle_basic_api(int fd, int gt_id)
> >  	reasons |= get_throttle(fd, gt_id, "reason_vr_tdc");
> >  	reasons |= get_throttle(fd, gt_id, "reason_vr_thermalert");
> >  
> > -	if (status)
> > -		igt_assert(reasons);
> > -	else
> > -		igt_assert(!reasons);
> > +	igt_assert(status == true || status == false);
> > +	igt_assert(reasons == true || reasons == false);
> 
> This would be the same as deleting the test case...

Well, given the current scenario there's nothing much we can test anyway,
other than maybe the file exists and we're reading something from it.

Raag

  parent reply	other threads:[~2024-11-06  7:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  6:32 [PATCH i-g-t v1] tests/intel/xe_gt_freq: Change basic throttle API test criteria Raag Jadav
2024-11-05  9:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-11-05 10:48 ` ✓ CI.xeBAT: " Patchwork
2024-11-05 16:09 ` [PATCH i-g-t v1] " Rodrigo Vivi
2024-11-06  5:20   ` Riana Tauro
2024-11-06  7:22   ` Raag Jadav [this message]
2024-11-06  4:44 ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-11-06 11:41 ` ✗ CI.xeFULL: " 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=ZysZT-30AHDDjI_p@black.fi.intel.com \
    --to=raag.jadav@intel.com \
    --cc=John.C.Harrison@intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sujaritha.sundaresan@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