[igt-dev] [PATCH i-g-t] test/kms_dp_dsc: Basic KMS test to validate VESA DSC on DP/eDP

Petri Latvala petri.latvala at intel.com
Wed Oct 17 07:48:24 UTC 2018


On Tue, Oct 16, 2018 at 02:14:59PM -0700, Antonio Argenziano wrote:
> > > > +		igt_assert_eq(ret, 0);
> > > > +	}
> > > > +
> > > > +	close(drm_fd);
> > > > +
> > > > +	igt_assert_eq(ret, 0);
> > > 
> > > 'ret' is already checked in the subtest also, this would fail if you don't
> > > run the subtest.
> > 
> > If I dont run the subtest, it will use the initialized value of ret which is 0.
> > It will only fail if update_display returns a negative value.
> 
> Sorry, you are right I misread that. But, it will not be this assert to fire
> if ret != 0 but the one in the subtest. My point was that this statement
> seems a bit redundant and could be eliminated.

It's not only redundant, it's invalid to call igt_assert when not
inside an igt_fixture or a subtest. See lib/igt_core.c:1180,
igt_can_fail().



-- 
Petri Latvala


More information about the igt-dev mailing list