[Intel-gfx] [PATCH i-g-t v2] tests/gem_ctx_param: Update invalid param

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 19 21:27:12 UTC 2017


Quoting Antonio Argenziano (2017-12-19 21:16:40)
> Since commit: drm/i915/scheduler: Support user-defined priorities, the
> driver support an extra context param to set context's priority. Add
> tests for that interface and update invalid tests.
> 
> v2:
>         - Add arg size validation test. (Chris)
>         - Add arg value overflow test. (Chris)
>         - Add test for unsupported platforms. (Chris)
>         - Feed interface with all priority values and in random order. (Chris)
> 
> Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> ---
> +               igt_subtest("user-set-priority-invalid-value") {
> +                       int prio_values[PRIO_RANGE - USER_PRIO_RANGE];
> +                       for (int i = 0; i < (PRIO_RANGE - USER_PRIO_RANGE); i++)
> +                               prio_values[i] = i + (MAX_USER_SET_PRIO + 1);
> +                       igt_permute_array(prio_values, ARRAY_SIZE(prio_values), igt_exchange_int);
> +
> +                       arg.ctx_id = gem_context_create(fd);

So arg.ctx_id points to different contexts depending on which subtests
are run, beside the context leak. But that does also make a good
suggestion that you do want to check both the default context (0) and a
user created context for handling (it may matter not today, but we do
already depend on the equivalence, i.e. that we can probe the default
context to determine support for user contexts). Do you feel like
parameterising the tests yet? :)
-Chris


More information about the Intel-gfx mailing list