[LTP] metadata: add tests grouping support
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Mon Jun 22 11:57:53 CEST 2026
Hi Andrea,
On Mon, 22 Jun 2026, Andrea Cervesato wrote:
> metadata: add tests grouping support
--- [PATCH 1/2] ---
> +static int parse_groups(struct data_node *groups, char *line)
> +{
> + s += sizeof(GROUPS_TAG) - 1;
> + if (*s && *s != ' ' && *s != '\t') {
> + WARN("Empty @group");
> + return 1;
> + }
Two things here:
The warning says "@group" (singular) but the tag is "@groups". More
importantly, this condition fires when "@groups" is immediately followed
by a non-whitespace character (e.g. "@groupsfoo"), which is not an
empty tag but a word that happens to share a prefix with the tag. The
message should probably say something like "invalid @groups suffix".
Separately, a truly empty "@groups" line (tag followed by nothing or
only whitespace) falls through to strtok which produces zero tokens and
returns 1 silently. Should that also warn?
> + /* inside the testcases/ folder we will always have at least one group */
> + data_node_hash_add(res, "groups", groups);
The comment is not accurate. A file like testcases/kernel/foo.c with
no @groups tags produces zero groups since "kernel" is the only parent
directory and is explicitly skipped.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list