From: Joe Fradley <joefradley@google.com>
To: Jonathan Corbet <corbet@lwn.net>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>
Cc: Joe Fradley <joefradley@google.com>,
kernel-team@android.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com,
Brendan Higgins <brendanhiggins@google.com>
Subject: [PATCH v2 2/2] kunit: no longer call module_info(test, "Y") for kunit modules
Date: Tue, 23 Aug 2022 07:24:55 -0700 [thread overview]
Message-ID: <20220823142456.3977086-3-joefradley@google.com> (raw)
In-Reply-To: <20220823142456.3977086-1-joefradley@google.com>
Because KUnit test execution is not a guarantee with the kunit.enable
parameter we want to be careful to only taint the kernel when actual
tests run. Calling module_info(test, "Y") for every KUnit module
automatically causes the kernel to be tainted upon module load. Therefore,
we're removing this call and relying on the KUnit framework to taint the
kernel or not.
Signed-off-by: Joe Fradley <joefradley@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
---
Changes since v1:
- Added David's and Brendan's Reviewed-by for tags.
include/kunit/test.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/kunit/test.h b/include/kunit/test.h
index ee6bf4ecbd89..512089e5ce4e 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -253,7 +253,6 @@ static inline int kunit_run_all_tests(void)
#endif /* IS_BUILTIN(CONFIG_KUNIT) */
#define __kunit_test_suites(unique_array, ...) \
- MODULE_INFO(test, "Y"); \
static struct kunit_suite *unique_array[] \
__aligned(sizeof(struct kunit_suite *)) \
__used __section(".kunit_test_suites") = { __VA_ARGS__ }
--
2.37.1.595.g718a3a8f04-goog
next prev parent reply other threads:[~2022-08-23 16:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 14:24 [PATCH v2 0/2] kunit: add boot time parameter to enable KUnit Joe Fradley
2022-08-23 14:24 ` [PATCH v2 1/2] kunit: add kunit.enable to enable/disable KUnit test Joe Fradley
2022-08-24 4:31 ` David Gow
2022-08-24 5:04 ` Joe Fradley
2022-08-24 6:33 ` David Gow
2022-08-24 14:13 ` Joe Fradley
2022-08-23 14:24 ` Joe Fradley [this message]
2022-09-25 0:42 ` [PATCH v2 0/2] kunit: add boot time parameter to enable KUnit Tales Aparecida
2022-09-28 13:58 ` Joe Fradley
2022-09-28 17:26 ` Tales Aparecida
2022-09-28 21:35 ` Joe Fradley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220823142456.3977086-3-joefradley@google.com \
--to=joefradley@google.com \
--cc=brendan.higgins@linux.dev \
--cc=brendanhiggins@google.com \
--cc=corbet@lwn.net \
--cc=davidgow@google.com \
--cc=kernel-team@android.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox