From: Emil Velikov Date: Thu, 29 May 2025 14:31:36 +0000 (+0100) Subject: testsuite: remove unused struct test::print_outputs X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=abd99d20e235e270f703dfac6d6313d0bf017143;p=thirdparty%2Fkmod.git 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 --- 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,