[PATCH i-g-t 1/2] tests/intel/xe_drm_fdinfo: Group utilization tests and skip when no utilization data

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Thu Mar 13 11:37:42 UTC 2025


On Wed, Mar 12, 2025 at 11:19:24PM -0500, Lucas De Marchi wrote:

<cut>

> > 
> > Yes, it is executed in addition to the outer fixture (but if the outer
> > fixture fails, this one should not run), so xe is already opened. This
> > fixture applies at the group scope - if it fails or is skipped, all
> > tests in the group will also fail or be skipped.
> > 
> > However, as Kamil pointed out, fixtures are executed even if no test
> > from the group is selected for execution. This means that if we run
> > igt at xe_drm_fdinfo@basic-mem (which is outside this group), the fixture
> > from the utilization group still runs, potentially logging an unmet
> > requirement.
> 
> ok, that's unfortunate. it would probably make sense to change that
> behavior.

I've stared to this few years ago and whole igt's would require
rewriting. Test selection by name is by matching in iterational
code, so until we get that point (subtest matching) we never
know what fixtures before should be executed or not. Unfortunately
test selection allows globbing, so we can't stop executing fixtures
after first match where group ends, because another glob match in
another group may be met.

Subtests, groups, fixtures should be registered first, then igt
logic should process subtest lists according to their groups/fixtures
calling registered fixtures before entering/after exiting groups.
Generally not so complicated, but time consuming to do this right.

--
Zbigniew

> 
> > 
> > IIUC, the only solution is to move the checks inside the subtests.
> 
> yeah, I see you went with that approach. Looks good to me too.
> 
> thanks
> Lucas De Marchi
> 
> > 
> > > 
> > > Lucas De Marchi
> > 


More information about the igt-dev mailing list