[igt-dev] [PATCH i-g-t 6/8] lib/igt_kmod: place KUnit tests on a subtest
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Wed Jun 7 08:10:24 UTC 2023
On Tue, 06 Jun 2023 16:22:21 +0200
Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com> wrote:
> > We can use whatever other name, provided that the output of
> > --list-subtests will be identical to the dynamic subtest. If not,
> > build will fail when checking for documentation inconsistencies.
>
> AFAICU, that checking process compares subtest names found in a documentation,
> here the source code, as pointed by you in one of your previouse answers as
> the source of the documentation, against --list output. But that sounds
> weird. What a sophisticated code parser must be used to resolve subtest names
> potentially provided via expressions? Another compiler?
> Or is there another source of documentation, which I already asked you for a
> reference to, and you didn't clearly answered yet, used by the build process
> for that checking?
There's no other source of documentation. The documentation toolset
has a --check tool that calls the binaries using "--list" parameter,
comparing them with the documentation inside the source code.
So, for tests/drm_mm.c file, the documentation is on its source:
/**
* TEST: drm mm
* Description: Basic sanity check of DRM's range manager (struct drm_mm)
* Feature: mapping
* Run type: FULL
*
* SUBTEST: all-tests
*
* SUBTEST: all-tests at align
* Category: Infrastructure
* Description: drm_mm range manager SW validation
* Functionality: DRM memory mangemnt
* Test category: GEM_Legacy
...
It will run build/tests/drm_mm --list in order to compare "SUBTEST"
the fields. The ones with "@" are dynamic subtests and are currently
ignored, as --list is currently not capable of reporting dynamic
subtests.
Now, it is possible to change from "all-tests" to something else, but
such patch also needs to change it inside tests/drm_mm.c.
Regards,
Mauro
More information about the igt-dev
mailing list