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

Cyril Hrubis chrubis@suse.cz
Wed Oct 16 16:46:24 CEST 2019


Hi!
> > +	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...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list