Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: "Gupta, Anshuman" <anshuman.gupta@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Nilawar, Badal" <badal.nilawar@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_pm_residency: convert all tests to dynamic subtests
Date: Fri, 19 Jul 2024 14:30:27 +0530	[thread overview]
Message-ID: <dfd9e002-f155-4757-aa97-961f72d1cbf8@intel.com> (raw)
In-Reply-To: <CY5PR11MB6211FC8FF92CA7DF6846080495AD2@CY5PR11MB6211.namprd11.prod.outlook.com>



On 7/19/2024 2:16 PM, Gupta, Anshuman wrote:
> 
> 
>> -----Original Message-----
>> From: Tauro, Riana <riana.tauro@intel.com>
>> Sent: Wednesday, July 17, 2024 3:31 PM
>> To: igt-dev@lists.freedesktop.org
>> Cc: Tauro, Riana <riana.tauro@intel.com>; Gupta, Anshuman
>> <anshuman.gupta@intel.com>; Nilawar, Badal <badal.nilawar@intel.com>
>> Subject: [PATCH i-g-t] tests/intel/xe_pm_residency: convert all tests to
>> dynamic subtests
>>
>> Convert all tests to dynamic subtests to identify which GT the tests are
>> running on.
>>
>> No functional changes
> LGTM.
> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
> Do you need to add the new test to our test list ?

No change required. Test names are retained. They are only converted to 
dynamic subtests.

The tests have run in BAT in patchwork CI

Thanks,
Riana
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>>   tests/intel/xe_pm_residency.c | 31 ++++++++++++++++++++-----------
>>   1 file changed, 20 insertions(+), 11 deletions(-)
>>
>> diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
>> index 367b1027c..51735d887 100644
>> --- a/tests/intel/xe_pm_residency.c
>> +++ b/tests/intel/xe_pm_residency.c
>> @@ -233,8 +233,8 @@ static void idle_residency_on_exec(int fd, struct
>> drm_xe_engine_class_instance *
>>   	unsigned long end, start;
>>   	unsigned long elapsed_ms, residency_end, residency_start;
>>
>> -	igt_debug("Running on %s:%d\n",
>> -		  xe_engine_class_string(hwe->engine_class), hwe-
>>> engine_instance);
>> +	igt_info("Running on %s:%d\n",
>> +		 xe_engine_class_string(hwe->engine_class), hwe-
>>> engine_instance);
>>   	done = mmap(0, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1,
>> 0);
>>   	igt_assert(done != MAP_FAILED);
>>   	memset(done, 0, 4096);
>> @@ -321,35 +321,44 @@ igt_main
>>   	}
>>
>>   	igt_describe("Validate GT C6 on idle");
>> -	igt_subtest("gt-c6-on-idle")
>> +	igt_subtest_with_dynamic("gt-c6-on-idle") {
>>   		xe_for_each_gt(fd, gt)
>> -			igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt), 1000, 1),
>> "GT %d not in C6\n", gt);
>> +			igt_dynamic_f("gt%u", gt)
>> +				igt_assert_f(igt_wait(xe_is_gt_in_c6(fd, gt),
>> 1000, 1),
>> +					     "GT %d not in C6\n", gt);
>> +	}
>>
>>   	igt_describe("Validate idle residency measured over suspend cycle is
>> within the tolerance");
>> -	igt_subtest("gt-c6-freeze") {
>> +	igt_subtest_with_dynamic("gt-c6-freeze") {
>>   		if (xe_has_vram(fd)) {
>>   			igt_device_get_pci_slot_name(fd, pci_slot_name);
>>   			igt_pm_get_d3cold_allowed(pci_slot_name,
>> &d3cold_allowed);
>>   			igt_pm_set_d3cold_allowed(pci_slot_name, 0);
>>   		}
>>   		xe_for_each_gt(fd, gt)
>> -			test_idle_residency(fd, gt, TEST_S2IDLE);
>> +			igt_dynamic_f("gt%u", gt)
>> +				test_idle_residency(fd, gt, TEST_S2IDLE);
>>
>>   		if (xe_has_vram(fd))
>>   			igt_pm_set_d3cold_allowed(pci_slot_name,
>> d3cold_allowed);
>>   	}
>>
>>   	igt_describe("Validate idle residency measured over a time interval is
>> within the tolerance");
>> -	igt_subtest("idle-residency")
>> +	igt_subtest_with_dynamic("idle-residency") {
>>   		xe_for_each_gt(fd, gt)
>> -			test_idle_residency(fd, gt, TEST_IDLE);
>> +			igt_dynamic_f("gt%u", gt)
>> +				test_idle_residency(fd, gt, TEST_IDLE);
>> +	}
>>
>>   	igt_describe("Validate idle residency on exec");
>> -	igt_subtest("idle-residency-on-exec") {
>> +	igt_subtest_with_dynamic("idle-residency-on-exec") {
>>   		xe_for_each_gt(fd, gt) {
>>   			xe_for_each_engine(fd, hwe) {
>> -				if (gt == hwe->gt_id && !hwe-
>>> engine_instance)
>> -					idle_residency_on_exec(fd, hwe);
>> +				if (gt == hwe->gt_id && !hwe-
>>> engine_instance) {
>> +					igt_dynamic_f("gt%u-engine-%s", gt,
>> +
>> xe_engine_class_string(hwe->engine_class))
>> +						idle_residency_on_exec(fd,
>> hwe);
>> +				}
>>   			}
>>   		}
>>   	}
>> --
>> 2.40.0
> 

      reply	other threads:[~2024-07-19  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 10:00 [PATCH i-g-t] tests/intel/xe_pm_residency: convert all tests to dynamic subtests Riana Tauro
2024-07-17 10:14 ` ✓ CI.xeBAT: success for " Patchwork
2024-07-17 10:21 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-17 13:22 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-07-17 13:37 ` ✗ CI.xeFULL: " Patchwork
2024-07-19  8:46 ` [PATCH i-g-t] " Gupta, Anshuman
2024-07-19  9:00   ` Riana Tauro [this message]

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=dfd9e002-f155-4757-aa97-961f72d1cbf8@intel.com \
    --to=riana.tauro@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=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