lib: Fix tst_print()

The final message is printed with more than one fprintf() and rarely if
used from more than one thread the resulting messages are mixed
together. This fixes that by composing the message in memory buffer
first.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
1 file changed