[LTP] [PATCH] lib: tst_test: Add reproducible output.
Cyril Hrubis
chrubis@suse.cz
Fri May 9 11:26:53 CEST 2025
Hi!
> > struct results {
> > int passed;
> > @@ -304,6 +305,9 @@ static void print_result(const char *file, const int lineno, int ttype,
> > str += ret;
> > size -= ret;
> >
> > + if (reproducible_output)
> > + goto print;
> > +
>
> I'd move this goto one code chunk down (after the color if-else) so that
> we also get the res string in the output. Or at least add a strncpy(str,
> res, size) before the goto if you want to bypass the color logic.
The color output is disabled when output is redirected into a file so I
suppose that we can simply move the goto after we print the result. I
will send a v2.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list