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

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 6 22:16:34 UTC 2018


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.
-Chris


More information about the igt-dev mailing list