[LTP] [PATCH 8/9] metadata: metaparse: Add a few pre-defined macros

Petr Vorel pvorel@suse.cz
Fri Dec 27 08:32:29 CET 2024


> Hi!
> > > +/* pre-defined macros that makes the output cleaner. */
> > > +static const struct macro {
> > > +	char *from;
> > > +	char *to;
> > > +} internal_macros[] = {
> > > +	{"TST_CG_V2", "2"},
> > > +	{"TST_CG_V1", "1"},
> > > +	{"TST_KB", "1024"},
> > > +	{"TST_MB", "1048576"},
> > > +	{"TST_GB", "1073741824"},
> > I guess we need a number for calculation (e.g. 1 * TST_GB)
> > Otherwise 1 GB would be more readable than a big number.

> The metadata are supposed to be read by a computer, so indeed the number
> is better. I guess that we can convert it to something more sensible in
> the perl script that generates the html pages.

+1 makes sense, I'll try to have look on it once it's merged.

Kind regards,
Petr


More information about the ltp mailing list