From: David Gow <davidgow@google.com>
To: Brendan Higgins <brendanhiggins@google.com>,
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>
Cc: Paraschiv@google.com,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"KUnit Development" <kunit-dev@googlegroups.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Maíra Canal" <maira.canal@usp.br>,
linux-mmc <linux-mmc@vger.kernel.org>,
linux-aspeed <linux-aspeed@lists.ozlabs.org>,
"OpenBMC Maillist" <openbmc@lists.ozlabs.org>,
linux-usb@vger.kernel.org, linux-modules@vger.kernel.org,
"Matt Johnston" <matt@codeconstruct.com.au>
Subject: Re: [PATCH v2 3/5] thunderbolt: test: Use kunit_test_suite() macro
Date: Wed, 22 Jun 2022 15:16:01 +0800 [thread overview]
Message-ID: <CABVgOSm-bgjTzeWjEtDZ+3f-zJLxjywtgVSqWu2-cK_ScRLHwA@mail.gmail.com> (raw)
In-Reply-To: <20220621085345.603820-4-davidgow@google.com>
[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]
On Tue, Jun 21, 2022 at 4:54 PM David Gow <davidgow@google.com> wrote:
>
> The new implementation of kunit_test_suite() for modules no longer
> conflicts with module_init, so can now be used by the thunderbolt tests.
>
> Also update the Kconfig entry to enable the test when KUNIT_ALL_TESTS is
> enabled.
>
> This means that kunit_tool can now successfully run and parse the test
> results with, for example:
> ./tools/testing/kunit/kunit.py run --arch=x86_64 \
> --kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_USB4=y \
> 'thunderbolt'
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>
> Changes since v1:
> https://lore.kernel.org/linux-kselftest/20220618090310.1174932-4-davidgow@google.com/
> - Actually include the Kconfig changes, which were mistakenly added to
> the next patch in the series in v1.
> - Add Acked-by tag from Mika Westerberg
>
> ---
> drivers/thunderbolt/Kconfig | 5 +++--
> drivers/thunderbolt/domain.c | 3 ---
> drivers/thunderbolt/tb.h | 8 --------
> drivers/thunderbolt/test.c | 12 +-----------
> 4 files changed, 4 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/thunderbolt/Kconfig b/drivers/thunderbolt/Kconfig
> index 4bfec8a28064..2a063d344b94 100644
> --- a/drivers/thunderbolt/Kconfig
> +++ b/drivers/thunderbolt/Kconfig
> @@ -28,8 +28,9 @@ config USB4_DEBUGFS_WRITE
> this for production systems or distro kernels.
>
> config USB4_KUNIT_TEST
> - bool "KUnit tests"
> - depends on KUNIT=y
> + bool "KUnit tests" if !KUNIT_ALL_TESTS
> + depends on KUNIT
> + default KUNIT_ALL_TESTS
>
FYI: It turns out we can't just replace the "depends on KUNIT=y" with
"depends on KUNIT" here, as it's still possible to have CONFIG_USB4=y
and CONFIG_KUNIT=m, which would lead to missing KUnit symbols during
link.
What does work is adding, in addition to "depends on KUNIT":
depends on (USB4=m || KUNIT=y)
Which will prevent the tests from being enabled in this situation.
I'll wait another day or so before sending out a v3 with this fixed,
in case there are any other issues which arise.
Cheers,
-- David
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]
next prev parent reply other threads:[~2022-06-22 7:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 8:53 [PATCH v2 0/5] Rework KUnit test execution in modules David Gow
2022-06-21 8:53 ` [PATCH v2 1/5] kunit: unify module and builtin suite definitions David Gow
2022-06-21 8:53 ` [PATCH v2 2/5] kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites David Gow
2022-06-21 20:29 ` Daniel Latypov
2022-06-21 8:53 ` [PATCH v2 3/5] thunderbolt: test: Use kunit_test_suite() macro David Gow
2022-06-21 20:23 ` Daniel Latypov
2022-06-22 7:16 ` David Gow [this message]
2022-06-21 8:53 ` [PATCH v2 4/5] nitro_enclaves: " David Gow
2022-06-21 15:57 ` Paraschiv, Andra-Irina
2022-06-21 8:53 ` [PATCH v2 5/5] mmc: sdhci-of-aspeed: " David Gow
2022-06-21 22:19 ` Daniel Latypov
2022-06-23 12:23 ` Ulf Hansson
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=CABVgOSm-bgjTzeWjEtDZ+3f-zJLxjywtgVSqWu2-cK_ScRLHwA@mail.gmail.com \
--to=davidgow@google.com \
--cc=Paraschiv@google.com \
--cc=andraprs@amazon.com \
--cc=andrew@aj.id.au \
--cc=brendanhiggins@google.com \
--cc=christophe.leroy@csgroup.eu \
--cc=dlatypov@google.com \
--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 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).