[igt-dev] [PATCH v3] tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture
Souza, Jose
jose.souza at intel.com
Fri Apr 3 17:50:41 UTC 2020
On Fri, 2020-04-03 at 17:26 +0300, Imre Deak wrote:
> On platforms w/o an aperture subtests using fences are not relevant,
> so
> skip them. This also fixes a use-after-free error happening as a
> side-effect of running the test on such platforms.
>
> v2: Call igt_require() earlier to speed up runtime. (José)
> v3: Fix the condition in igt_require().
>
Reviewed-by: José Roberto de Souza <jose.souza at intel.com>
> Cc: José Roberto de Souza <jose.souza at intel.com>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> tests/kms_flip.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 9ce83c53d..77efb1d28 100755
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -216,6 +216,7 @@ static void emit_fence_stress(struct test_output
> *o)
>
> igt_require(bufmgr);
>
> + igt_assert(num_fences);
> bo = calloc(sizeof(*bo), num_fences);
> exec = calloc(sizeof(*exec), num_fences+1);
> for (i = 0; i < num_fences - 1; i++) {
> @@ -1339,6 +1340,8 @@ static int run_test(int duration, int flags)
> int i, n, modes = 0;
>
> igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
> + igt_require(!(flags & TEST_FENCE_STRESS) ||
> + gem_available_fences(drm_fd));
>
> resources = drmModeGetResources(drm_fd);
> igt_require(resources);
> @@ -1396,6 +1399,8 @@ static int run_pair(int duration, int flags)
> int i, j, m, n, modes = 0;
>
> igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
> + igt_require(!(flags & TEST_FENCE_STRESS) ||
> + gem_available_fences(drm_fd));
>
> resources = drmModeGetResources(drm_fd);
> igt_require(resources);
More information about the igt-dev
mailing list