Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>, Raag Jadav <raag.jadav@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>
Subject: Re: [PATCH i-g-t v1] tests/intel/xe_gt_freq: Change basic throttle API test criteria
Date: Wed, 6 Nov 2024 10:50:55 +0530	[thread overview]
Message-ID: <68b4a4b4-3496-4200-8396-e1b87a9f9924@intel.com> (raw)
In-Reply-To: <ZypDRUBurYJBd9eo@intel.com>

Hi Raag

On 11/5/2024 9:39 PM, 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.
> 
>> 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);
Why not fail the test only if both status and reasons are set to true.
That would indicate there is throttling and also be a valid failure.


Thanks
Riana
> 
> This would be the same as deleting the test case...
> 
>>   }
>>   
>>   /**
>> -- 
>> 2.34.1
>>


  reply	other threads:[~2024-11-06  5:21 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 [this message]
2024-11-06  7:22   ` Raag Jadav
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=68b4a4b4-3496-4200-8396-e1b87a9f9924@intel.com \
    --to=riana.tauro@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=raag.jadav@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