From abd99d20e235e270f703dfac6d6313d0bf017143 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 29 May 2025 15:31:36 +0100 Subject: [PATCH] testsuite: remove unused struct test::print_outputs None of our tests use it, plus it's inconsistently handled - plain comparison honours it, regex comparison does not. In addition, on test failure the expected/actual values are always printed. So we're not missing anything (too) critical here. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/361 Signed-off-by: Lucas De Marchi --- testsuite/testsuite.c | 3 --- testsuite/testsuite.h | 1 - 2 files changed, 4 deletions(-) diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c index a2552a16..545dda74 100644 --- a/testsuite/testsuite.c +++ b/testsuite/testsuite.c @@ -553,9 +553,6 @@ static bool fd_cmp_exact(struct fd_cmp *fd_cmp, const struct test *t) fd_cmp->buf[r] = '\0'; fd_cmp->buf_match[r] = '\0'; - if (t->print_outputs) - printf("%s: %s\n", fd_cmp->name, fd_cmp->buf); - if (!streq(fd_cmp->buf, fd_cmp->buf_match)) { ERR("Outputs do not match on %s:\n", fd_cmp->name); ERR("correct:\n%s\n", fd_cmp->buf_match); diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h index c40d7edc..e2f44240 100644 --- a/testsuite/testsuite.h +++ b/testsuite/testsuite.h @@ -99,7 +99,6 @@ struct test { bool expected_fail; /* allow to skip tests that don't meet compile-time dependencies */ bool skip; - bool print_outputs; } __attribute__((aligned(8))); int test_init(const struct test *start, const struct test *stop, int argc, -- 2.47.2