[LTP] [PATCH 1/9] metadata: metaparse: Parse operators *, +, and | properly

Petr Vorel pvorel@suse.cz
Wed Dec 18 20:08:26 CET 2024


HI Cyril,

> This is needed for cases where we assing integer values to tst_test
> structure members such as:

> TST_SR_SKIP_MISSING|TST_SR_TCONF flags in .save_restore
> (1*TST_MB) in .min_swap_avail
> [N+1, "TST_NEEDS"] in .hugepages

Thanks!

...
> +++ b/metadata/metaparse.c
> @@ -173,6 +173,9 @@ static char *next_token2(FILE *f, char *buf, size_t buf_len, struct data_node *d
>  		case '[':
>  		case ']':
>  		case '#':
> +		case '|':
> +		case '+':
> +		case '*':

I suppose we don't need '/' and '%' right?

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr


More information about the ltp mailing list