[igt-dev] [PATCH i-g-t] lib/igt_set: Adding combinatorics facility

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 17 13:52:36 UTC 2020


Quoting Zbigniew Kempczyński (2020-01-17 07:54:49)
> Dynamic tests gives us new method to create tests depending on the
> hardware/software capabilities. To check coverage some tests require
> verification over some set of objects/data. To make life easier
> with combinatorics this patch introduces igt_set. Currently it supports
> iterating over set to get subsets, combinations and multicombinations.
> Code has some limitation (set/subset cannot be larger than 16 elements,
> what is enough for most cases).

I have to say, this looks like it is going to be very, very useful. All
those times where I've used
	for_each_engine {
		for_each_engine {
		}
	}
can be reduced to a standard combinatorial set, with igt_dynamic
labelling thrown on top.

Petri, can you suggest how to write the selftests for igt? We definitely
need a few to verify it works as expected and provide a few simple
examples.
-Chris


More information about the igt-dev mailing list