From: Randy Dunlap <rdunlap@infradead.org> To: Alan Maguire <alan.maguire@oracle.com>, linux-kselftest@vger.kernel.org, brendanhiggins@google.com, skhan@linuxfoundation.org Cc: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com, akpm@linux-foundation.org, yamada.masahiro@socionext.com, catalin.marinas@arm.com, joe.lawrence@redhat.com, penguin-kernel@i-love.sakura.ne.jp, schowdary@nvidia.com, urezki@gmail.com, andriy.shevchenko@linux.intel.com, changbin.du@intel.com, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Knut Omang <knut.omang@oracle.com> Subject: Re: [PATCH v2 linux-kselftest-test 2/3] kunit: allow kunit to be loaded as a module Date: Tue, 8 Oct 2019 08:13:30 -0700 [thread overview] Message-ID: <3459e950-d8f0-edd1-2f23-ec9f520058f5@infradead.org> (raw) In-Reply-To: <1570546546-549-3-git-send-email-alan.maguire@oracle.com> On 10/8/19 7:55 AM, Alan Maguire wrote: > Making kunit itself buildable as a module allows for "always-on" > kunit configuration; specifying CONFIG_KUNIT=m means the module > is built but only used when loaded. Kunit test modules will load > kunit.ko as an implicit dependency, so simply running > "modprobe my-kunit-tests" will load the tests along with the kunit > module and run them. > > Signed-off-by: Alan Maguire <alan.maguire@oracle.com> > Signed-off-by: Knut Omang <knut.omang@oracle.com> > > --- > lib/kunit/Kconfig | 2 +- > lib/kunit/Makefile | 4 +++- > lib/kunit/test.c | 4 ++++ > 3 files changed, 8 insertions(+), 2 deletions(-) > diff --git a/lib/kunit/test.c b/lib/kunit/test.c > index e7896f1..6024627 100644 > --- a/lib/kunit/test.c > +++ b/lib/kunit/test.c > @@ -484,3 +484,7 @@ void kunit_cleanup(struct kunit *test) > } > } > EXPORT_SYMBOL_GPL(kunit_cleanup); > + > +#ifdef MODULE > +MODULE_LICENSE("GPL"); > +#endif /* MODULE */ That ifdef/endif should not be necessary. Did you try a modular build without them? -- ~Randy
next prev parent reply other threads:[~2019-10-08 15:13 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-08 14:55 [PATCH v2 linux-kselftest-test 0/3] kunit: support building core/tests as modules Alan Maguire 2019-10-08 14:55 ` [PATCH v2 linux-kselftest-test 1/3] kunit: allow kunit tests to be loaded as a module Alan Maguire 2019-10-08 21:35 ` Brendan Higgins 2019-10-09 16:35 ` Alan Maguire 2019-10-11 9:47 ` Brendan Higgins 2019-10-11 10:25 ` Alan Maguire 2019-10-16 23:01 ` Brendan Higgins 2019-10-17 18:32 ` Alan Maguire 2019-10-18 12:21 ` Luis Chamberlain 2019-10-24 1:33 ` Brendan Higgins 2019-10-08 14:55 ` [PATCH v2 linux-kselftest-test 2/3] kunit: allow kunit " Alan Maguire 2019-10-08 15:13 ` Randy Dunlap [this message] 2019-10-08 14:55 ` [PATCH v2 linux-kselftest-test 3/3] kunit: update documentation to describe module-based build Alan Maguire 2019-10-08 21:47 ` Brendan Higgins 2019-10-08 21:00 ` [PATCH v2 linux-kselftest-test 0/3] kunit: support building core/tests as modules Brendan Higgins 2019-10-14 9:20 ` Luis Chamberlain 2019-10-14 14:02 ` Alan Maguire 2019-10-16 12:47 ` Luis Chamberlain
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=3459e950-d8f0-edd1-2f23-ec9f520058f5@infradead.org \ --to=rdunlap@infradead.org \ --cc=akpm@linux-foundation.org \ --cc=alan.maguire@oracle.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=brendanhiggins@google.com \ --cc=catalin.marinas@arm.com \ --cc=changbin.du@intel.com \ --cc=joe.lawrence@redhat.com \ --cc=keescook@chromium.org \ --cc=knut.omang@oracle.com \ --cc=kunit-dev@googlegroups.com \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-kselftest@vger.kernel.org \ --cc=mcgrof@kernel.org \ --cc=penguin-kernel@i-love.sakura.ne.jp \ --cc=schowdary@nvidia.com \ --cc=skhan@linuxfoundation.org \ --cc=urezki@gmail.com \ --cc=yamada.masahiro@socionext.com \ --cc=yzaikin@google.com \ --subject='Re: [PATCH v2 linux-kselftest-test 2/3] kunit: allow kunit to be loaded as a module' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).