[LTP] [PATCH 2/2] tst_test: Don't print hints if failed to acquire
Cyril Hrubis
chrubis@suse.cz
Wed May 29 19:51:08 CEST 2024
Hi!
This is a great catch but I do not think that it should be limited to
the device init. We should distable the hints during the whole library
setup and only enable them once we actually start running the test.
I guess that we need:
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 190e8da2a..47d0ecf7d 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -61,6 +61,7 @@ static int mntpoint_mounted;
static int ovl_mounted;
static struct timespec tst_start_time; /* valid only for test pid */
static int tdebug;
+static int show_failure_hints;
struct results {
int passed;
@@ -883,7 +884,8 @@ static void do_exit(int ret)
if (results->broken) {
ret |= TBROK;
- print_failure_hints();
+ if (show_failure_hints)
+ print_failure_hints();
}
fprintf(stderr, "\nSummary:\n");
@@ -1740,6 +1742,8 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self)
if (tst_test->test_variants)
test_variants = tst_test->test_variants;
+ show_failure_hints = 1;
+
for (tst_variant = 0; tst_variant < test_variants; tst_variant++) {
if (tst_test->all_filesystems)
ret |= run_tcases_per_fs();
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list