[LTP] [PATCH 1/2] lib: Add support for test tags

Petr Vorel pvorel@suse.cz
Wed Oct 16 21:43:48 CEST 2019


Hi Cyril,

> > > +	if (tags) {
> > > +		for (i = 0; tags[i].name; i++) {
> > > +			if (!strcmp(tags[i].name, "CVE"))
> > > +				printf(CVE_DB_URL "%s\n", tags[i].value);
> > > +			else if (!strcmp(tags[i].name, "linux-git"))
> > Not sure if it's worth of defining some enums instead of "CVE", "linux-git"
> > (would catch typos).

> I wanted to avoid enums because they are not flexible enough. The plan
> here is that docparse would do sanity checks on test metadata and fail
> the compilation if it founds typos there. With the checks in the
> docparse tool we can easily check for tags that looks like typos, i.e.
> check the levenshtein distance from all known tags and print a nice
> looking error message...
OK, sounds good :).

Kind regards,
Petr


More information about the ltp mailing list