]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: remove unused struct test::print_outputs
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 29 May 2025 14:31:36 +0000 (15:31 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 12:54:40 +0000 (07:54 -0500)
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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/361
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/testsuite.c
testsuite/testsuite.h

index a2552a160f9832196f420dad832178aa7dec70c4..545dda74e090c76082b0084834be6162aba3b808 100644 (file)
@@ -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);
index c40d7edc793cbcbbd3a071314b09d7e013e74156..e2f442409cc4c5980f47cf9e40a08958cac07f47 100644 (file)
@@ -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,