All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] lib: Add support for test tags
Date: Wed, 16 Oct 2019 16:46:24 +0200	[thread overview]
Message-ID: <20191016144624.GB19517@rei.lan> (raw)
In-Reply-To: <20191016133039.GA6842@dell5510>

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

  reply	other threads:[~2019-10-16 14:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 11:25 [LTP] [PATCH 0/2] Add support for a test tags Cyril Hrubis
2019-10-14 11:25 ` [LTP] [PATCH 1/2] lib: Add support for " Cyril Hrubis
2019-10-15  5:12   ` Li Wang
2019-10-15  7:42     ` Richard Palethorpe
2019-10-15  9:57       ` Cyril Hrubis
2019-10-15  9:54     ` Cyril Hrubis
2019-10-16 13:30   ` Petr Vorel
2019-10-16 14:46     ` Cyril Hrubis [this message]
2019-10-16 19:43       ` Petr Vorel
2019-10-14 11:25 ` [LTP] [PATCH 2/2] testcases/kernel: Add linux git and CVE tags Cyril Hrubis
2019-10-15  4:54   ` Li Wang
2019-10-15  9:52     ` Cyril Hrubis
2019-10-16 13:21       ` Petr Vorel
2019-10-17  3:22         ` Li Wang
2019-10-17  8:38         ` Jan Stancek
  -- strict thread matches above, loose matches on Subject: below --
2019-10-14 11:23 [LTP] [PATCH 0/2] Add support for a test tags Cyril Hrubis
2019-10-14 11:23 ` [LTP] [PATCH 1/2] lib: Add support for " Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191016144624.GB19517@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.