[igt-dev] [PATCH i-g-t] tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture
Imre Deak
imre.deak at intel.com
Fri Apr 3 12:34:44 UTC 2020
On Thu, Apr 02, 2020 at 11:21:08PM +0300, Souza, Jose wrote:
> On Thu, 2020-04-02 at 15:29 +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.
> >
> > Signed-off-by: Imre Deak <imre.deak at intel.com>
> > ---
> > tests/kms_flip.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> > index 9ce83c53d..506c9c142 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++) {
> > @@ -1234,8 +1235,10 @@ static void run_test_on_crtc_set(struct
> > test_output *o, int *crtc_idxs,
> > o->fb_width *= 2;
> >
> > tiling = LOCAL_DRM_FORMAT_MOD_NONE;
> > - if (o->flags & TEST_FENCE_STRESS)
> > + if (o->flags & TEST_FENCE_STRESS) {
> > + igt_require(gem_available_fences(drm_fd));
>
> Would be better to skip on the begining of run_test() so less CI time
> is wasted in those tests, right after:
> igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
run_pair() needs the same test then, but ok I can move the check
earlier.
>
> > tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
> > + }
> >
> > /* 256 MB is usually the maximum mappable aperture,
> > * (make it 4x times that to ensure failure) */
More information about the igt-dev
mailing list