[Automated-testing] LTP and test metadata

Cyril Hrubis chrubis at suse.cz
Fri Oct 4 03:00:17 PDT 2019


Hi!
> > Just a note.  At the CKI hackfest we discussed adding meta-data
> > to kselftests, and came to the conclusion that for any meta-data
> > expressed in the Linux kernel tree inside source files, we're likely
> > going to have to use the kernel-doc format (or have to explain
> > why we're introducing a new structured-comment format).
> 
> If it's expressed as comments, I would suggest to ensure that it's
> possible to detect any errors in the descriptions (rather than be
> silently confusing mis-spelled metadata with non-metadata and
> ignoring). If it's not checked it will slowly get into unmaintainable
> mess over years ("oh, turns out we did not run this test for past 3
> years, because there was a typo").
> 
> An example could be:
> 
> /* META
> ...
> ... actual metadata goes here
> ...
> */
> 
> And then a checker will ensure that (1) each test has that block, (2)
> every line of the block parses as metadata (no silent ignoring).
> It may also allow for a more handy for humans format (if it's checked
> you don't need some overly verbose format just to be able to
> distinguish metadata from non-metadata).

Indeed, I do plan to be as strict as possible so that typos does not
happen. The idea is to have different sections in that comment, the
names of the sections would be pre-defined and anything that does not
match that set would be treated as error, etc.

-- 
Cyril Hrubis
chrubis at suse.cz


More information about the automated-testing mailing list