[PATCH i-g-t 2/2] tests/intel/xe_oa: Enable OA tests for simulation

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Wed Mar 5 16:25:32 UTC 2025


On Tue, Mar 04, 2025 at 09:01:47PM -0800, Dixit, Ashutosh wrote:
>On Tue, 04 Mar 2025 16:57:16 -0800, Umesh Nerlige Ramappa wrote:
>>
>> Simulation runs are slow, so account for that by modifying the scope of
>> the tests.
>>
>> - Set parameters specific to simulation during init.
>> - Skip tests that are heavily reliant on timing and that only test SW
>>   functionality.
>>
>> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
>> ---
>>  tests/intel/xe_oa.c | 32 ++++++++++++++++++++++++--------
>>  1 file changed, 24 insertions(+), 8 deletions(-)
>>
>> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>> index e5744d830d39..06d324159211 100644
>> --- a/tests/intel/xe_oa.c
>> +++ b/tests/intel/xe_oa.c
>> @@ -1111,13 +1111,25 @@ init_sys_info(void)
>>
>>	intel_xe_perf_load_perf_configs(intel_xe_perf, drm_fd);
>>
>> -	min_oa_exponent = 5;
>> -	max_oa_exponent = 20;
>> -	rc_width = 1920;
>> -	rc_height = 1080;
>> -	buffer_fill_size = SZ_16M;
>> -	num_buf_sizes = ARRAY_SIZE(buf_sizes);
>> -	oa_exponent_default = max_oa_exponent_for_period_lte(1000000);
>> +	if (igt_run_in_simulation()) {
>> +		igt_debug("SIMULATION run\n");
>> +		min_oa_exponent = 5;
>> +		max_oa_exponent = 10;
>> +		rc_width = 64;
>> +		rc_height = 36;
>> +		buffer_fill_size = SZ_128K;
>> +		num_buf_sizes = 3;
>> +		oa_exponent_default = max_oa_exponent_for_period_lte(1000);
>> +	} else {
>> +		igt_debug("HW run\n");
>> +		min_oa_exponent = 5;
>> +		max_oa_exponent = 20;
>> +		rc_width = 1920;
>> +		rc_height = 1080;
>> +		buffer_fill_size = SZ_16M;
>> +		num_buf_sizes = ARRAY_SIZE(buf_sizes);
>> +		oa_exponent_default = max_oa_exponent_for_period_lte(1000000);
>> +	}
>
>Just a question here: what execution time (allowed by CI) are we assuming
>for these simulation specific params?

Hmm, nothing specific. Most tests run within 10 seconds, with only a few 
touching close to 10. The oa-exponents and oa-formats take close to 30 
seconds though because they iterate over a few values. If that's long, 
we could do random formats and random exponents as an improvement.

>
>>
>>	default_oa_buffer_size = get_default_oa_buffer_size(drm_fd);
>>	igt_debug("default_oa_buffer_size: %zu\n", default_oa_buffer_size);
>> @@ -4758,6 +4770,7 @@ igt_main
>>			test_enable_disable(hwe);
>>
>>	igt_subtest_with_dynamic("blocking") {
>> +		igt_require(!igt_run_in_simulation());
>>		__for_one_hwe_in_oag(hwe)
>>			test_blocking(40 * 1000 * 1000 /* 40ms oa period */,
>>				      false /* set_kernel_hrtimer */,
>> @@ -4766,6 +4779,7 @@ igt_main
>>	}
>>
>>	igt_subtest_with_dynamic("polling") {
>> +		igt_require(!igt_run_in_simulation());
>>		__for_one_hwe_in_oag(hwe)
>>			test_polling(40 * 1000 * 1000 /* 40ms oa period */,
>>				     false /* set_kernel_hrtimer */,
>> @@ -4805,8 +4819,10 @@ igt_main
>>		igt_subtest("oa-unit-exclusive-stream-exec-q")
>>			test_oa_unit_exclusive_stream(false);
>>
>> -		igt_subtest("oa-unit-concurrent-oa-buffer-read")
>> +		igt_subtest("oa-unit-concurrent-oa-buffer-read") {
>> +			igt_require(!igt_run_in_simulation());
>>			test_oa_unit_concurrent_oa_buffer_read();
>> +		}
>
>I am assuming all remaining tests either (a) pass in simulation, or, (b)
>have legitimate failures there which need fixing. This is great news:

Correct, most pass and some need additional debug/fixes.

>
>Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

Thanks,
Umesh
>
>>	}
>>
>>	igt_subtest("rc6-disable") {
>> --
>> 2.45.2
>>


More information about the igt-dev mailing list