libtracefs: utest: Return non-zero exit code when something fails

Previously, the test suite returned zero exit status even if something
failed. One could learn about the failure from the output, such as:

    WARNING - Suite initialization failed for 'tracefs library'.
    Run Summary:    Type  Total    Ran Passed Failed Inactive
                  suites      1      0    n/a      1        0
                   tests     37      0      0      0        0

However, when the test suite is run via meson, i.e. with:

    meson setup build && meson test -C build

Meson always reports success, because it primarily looks at process
exit code.

To not make meson mask failures, this commit sets the exit code to one
if some suite (we have just one) or test fails. Additionally, it
prints error messages in the suite initialization function, to make
the failure more understandable.

Link: https://lore.kernel.org/20250728143433.1114222-1-michal.sojka@cvut.cz
Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2 files changed