[igt-dev] [PATCH i-g-t v5] lib: Move __gem_context_create to common ioctl wrapper library.

Antonio Argenziano antonio.argenziano at intel.com
Wed Feb 7 00:09:01 UTC 2018



On 06/02/18 14:16, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-02-06 21:36:36)
>> diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c
>> index 6ee944ff..7114a67a 100644
>> --- a/tests/gem_exec_fence.c
>> +++ b/tests/gem_exec_fence.c
>> @@ -1528,22 +1528,28 @@ igt_main
>>                  }
>>          }
>>   
>> -       igt_subtest("long-history") {
>> -               long ring_size = measure_ring_size(i915) - 1;
>> +       igt_subtest_group {
>> +               igt_fixture {
>> +                       gem_require_contexts(i915);
> 
> With a group fixture, you can pull the repeated ring measurement into
> the single fixture.
> 
>> +               }
>>   
>> -               igt_info("Ring size: %ld batches\n", ring_size);
>> -               igt_require(ring_size);
>> +               igt_subtest("long-history") {
>> +                       long ring_size = measure_ring_size(i915) - 1;
>>   
>> -               test_long_history(i915, ring_size, 0);
>> -       }
>> +                       igt_info("Ring size: %ld batches\n", ring_size);
>> +                       igt_require(ring_size);
>>   
>> -       igt_subtest("expired-history") {
>> -               long ring_size = measure_ring_size(i915) - 1;
>> +                       test_long_history(i915, ring_size, 0);
>> +               }
>> +
>> +               igt_subtest("expired-history") {
>> +                       long ring_size = measure_ring_size(i915) - 1;
>>   
>> -               igt_info("Ring size: %ld batches\n", ring_size);
>> -               igt_require(ring_size);
>> +                       igt_info("Ring size: %ld batches\n", ring_size);
>> +                       igt_require(ring_size);
>>   
>> -               test_long_history(i915, ring_size, EXPIRED);
>> +                       test_long_history(i915, ring_size, EXPIRED);
>> +               }
>>          }
>> @@ -666,9 +653,6 @@ igt_main
>>          igt_subtest("basic-parallel")
>>                  parallel(device, handle, 5);
>>   
>> -       igt_subtest("basic-sequential")
>> -               sequential(device, handle, 0, 5);
> 
> Something to bear in mind here is order is important for running
> tests-as-a-whole. gem_exec_nop starts with the quick basic tests before
> doing the longer tests.

I'll put the require into sequential() and leave the subtests alone.

Thanks,
Antonio

> -Chris
> 


More information about the igt-dev mailing list