All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brendan Higgins <brendanhiggins@google.com>
To: David Gow <davidgow@google.com>
Cc: "Luis Chamberlain" <mcgrof@kernel.org>,
	"Jeremy Kerr" <jk@codeconstruct.com.au>,
	"Daniel Latypov" <dlatypov@google.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Andra Paraschiv" <andraprs@amazon.com>,
	Longpeng <longpeng2@huawei.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Maíra Canal" <maira.canal@usp.br>,
	linux-mmc@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
	openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org,
	linux-modules@vger.kernel.org,
	"Matt Johnston" <matt@codeconstruct.com.au>
Subject: Re: [PATCH v3 1/5] kunit: unify module and builtin suite definitions
Date: Wed, 6 Jul 2022 17:05:46 -0400	[thread overview]
Message-ID: <CAFd5g44w0h-EFfw-1wY=bBu_BbO1xi3Ys6gPoDogthCxrF14Qg@mail.gmail.com> (raw)
In-Reply-To: <20220625050838.1618469-2-davidgow@google.com>

On Sat, Jun 25, 2022 at 1:10 AM David Gow <davidgow@google.com> wrote:
>
> From: Jeremy Kerr <jk@codeconstruct.com.au>
>
> Currently, KUnit runs built-in tests and tests loaded from modules
> differently. For built-in tests, the kunit_test_suite{,s}() macro adds a
> list of suites in the .kunit_test_suites linker section. However, for
> kernel modules, a module_init() function is used to run the test suites.
>
> This causes problems if tests are included in a module which already
> defines module_init/exit_module functions, as they'll conflict with the
> kunit-provided ones.
>
> This change removes the kunit-defined module inits, and instead parses
> the kunit tests from their own section in the module. After module init,
> we call __kunit_test_suites_init() on the contents of that section,
> which prepares and runs the suite.
>
> This essentially unifies the module- and non-module kunit init formats.
>
> Tested-by: Maíra Canal <maira.canal@usp.br>
> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> Signed-off-by: David Gow <davidgow@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

WARNING: multiple messages have this Message-ID (diff)
From: Brendan Higgins <brendanhiggins@google.com>
To: David Gow <davidgow@google.com>
Cc: "Matt Johnston" <matt@codeconstruct.com.au>,
	"Andra Paraschiv" <andraprs@amazon.com>,
	linux-aspeed@lists.ozlabs.org, "Andrew Jeffery" <andrew@aj.id.au>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Daniel Latypov" <dlatypov@google.com>,
	linux-usb@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Maíra Canal" <maira.canal@usp.br>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	linux-kselftest@vger.kernel.org,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Jeremy Kerr" <jk@codeconstruct.com.au>,
	Longpeng <longpeng2@huawei.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	openbmc@lists.ozlabs.org, linux-modules@vger.kernel.org,
	kunit-dev@googlegroups.com
Subject: Re: [PATCH v3 1/5] kunit: unify module and builtin suite definitions
Date: Wed, 6 Jul 2022 17:05:46 -0400	[thread overview]
Message-ID: <CAFd5g44w0h-EFfw-1wY=bBu_BbO1xi3Ys6gPoDogthCxrF14Qg@mail.gmail.com> (raw)
In-Reply-To: <20220625050838.1618469-2-davidgow@google.com>

On Sat, Jun 25, 2022 at 1:10 AM David Gow <davidgow@google.com> wrote:
>
> From: Jeremy Kerr <jk@codeconstruct.com.au>
>
> Currently, KUnit runs built-in tests and tests loaded from modules
> differently. For built-in tests, the kunit_test_suite{,s}() macro adds a
> list of suites in the .kunit_test_suites linker section. However, for
> kernel modules, a module_init() function is used to run the test suites.
>
> This causes problems if tests are included in a module which already
> defines module_init/exit_module functions, as they'll conflict with the
> kunit-provided ones.
>
> This change removes the kunit-defined module inits, and instead parses
> the kunit tests from their own section in the module. After module init,
> we call __kunit_test_suites_init() on the contents of that section,
> which prepares and runs the suite.
>
> This essentially unifies the module- and non-module kunit init formats.
>
> Tested-by: Maíra Canal <maira.canal@usp.br>
> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>
> Signed-off-by: David Gow <davidgow@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

  reply	other threads:[~2022-07-06 21:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  5:08 [PATCH v3 0/5] Rework KUnit test execution in modules David Gow
2022-06-25  5:08 ` David Gow
2022-06-25  5:08 ` [PATCH v3 1/5] kunit: unify module and builtin suite definitions David Gow
2022-06-25  5:08   ` David Gow
2022-07-06 21:05   ` Brendan Higgins [this message]
2022-07-06 21:05     ` Brendan Higgins
2022-07-08 18:23   ` Daniel Latypov
2022-07-09  3:25     ` David Gow
2022-07-09  3:25       ` David Gow
2022-06-25  5:08 ` [PATCH v3 2/5] kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites David Gow
2022-06-25  5:08   ` David Gow
2022-07-06 21:15   ` Brendan Higgins
2022-07-06 21:15     ` Brendan Higgins
2022-06-25  5:08 ` [PATCH v3 3/5] thunderbolt: test: Use kunit_test_suite() macro David Gow
2022-06-25  5:08   ` David Gow
2022-07-06 21:19   ` Brendan Higgins
2022-07-06 21:19     ` Brendan Higgins
2022-06-25  5:08 ` [PATCH v3 4/5] nitro_enclaves: " David Gow
2022-06-25  5:08   ` David Gow
2022-07-06 21:21   ` Brendan Higgins
2022-07-06 21:21     ` Brendan Higgins
2022-06-25  5:08 ` [PATCH v3 5/5] mmc: sdhci-of-aspeed: " David Gow
2022-06-25  5:08   ` David Gow
2022-07-06 21:24   ` Brendan Higgins
2022-07-06 21:24     ` Brendan Higgins

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='CAFd5g44w0h-EFfw-1wY=bBu_BbO1xi3Ys6gPoDogthCxrF14Qg@mail.gmail.com' \
    --to=brendanhiggins@google.com \
    --cc=andraprs@amazon.com \
    --cc=andrew@aj.id.au \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jk@codeconstruct.com.au \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=longpeng2@huawei.com \
    --cc=maira.canal@usp.br \
    --cc=matt@codeconstruct.com.au \
    --cc=mcgrof@kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.