From: Brendan Higgins <brendanhiggins@google.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-clk@vger.kernel.org,
KUnit Development <kunit-dev@googlegroups.com>
Subject: Re: [PATCH/RFC] clk: gate: Add some kunit test suites
Date: Thu, 9 Apr 2020 13:09:03 -0700 [thread overview]
Message-ID: <CAFd5g46JHKmrEbYeL_Yu8djPHr-6QwidumLKtdYoYOwC_ALpaQ@mail.gmail.com> (raw)
In-Reply-To: <20200408035637.110858-1-sboyd@kernel.org>
On Tue, Apr 7, 2020 at 8:56 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Test various parts of the clk gate implementation with the kunit testing
> framework.
>
> Cc: Brendan Higgins <brendanhiggins@google.com>
> Cc: <kunit-dev@googlegroups.com>
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
One very minor nit below, other than that this looks great! I couldn't
have done a better job myself.
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> ---
>
> This patch is on top of this series[1] that allows the clk
> framework to be selected by Kconfig language.
>
> [1] https://lore.kernel.org/r/20200405025123.154688-1-sboyd@kernel.org
>
> drivers/clk/Kconfig | 8 +
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-gate-test.c | 481 ++++++++++++++++++++++++++++++++++++
> 3 files changed, 490 insertions(+)
> create mode 100644 drivers/clk/clk-gate-test.c
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 6ea0631e3956..66193673bcdf 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -377,4 +377,12 @@ source "drivers/clk/ti/Kconfig"
> source "drivers/clk/uniphier/Kconfig"
> source "drivers/clk/zynqmp/Kconfig"
>
> +# Kunit test cases
Minor nit: Elsewhere you use KUnit.
I wasn't going to say anything because so many people go with the
"Kunit" capitalization (and actually I kind of prefer it), but you
should at least be consistent within your patch.
> +config CLK_GATE_TEST
> + tristate "Basic gate type Kunit test"
> + depends on KUNIT
> + default KUNIT
> + help
> + Kunit test for the basic clk gate type.
> +
> endif
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index f4169cc2fd31..0785092880fd 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -7,6 +7,7 @@ obj-$(CONFIG_COMMON_CLK) += clk-divider.o
> obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o
> obj-$(CONFIG_COMMON_CLK) += clk-fixed-rate.o
> obj-$(CONFIG_COMMON_CLK) += clk-gate.o
> +obj-$(CONFIG_CLK_GATE_TEST) += clk-gate-test.o
> obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o
> obj-$(CONFIG_COMMON_CLK) += clk-mux.o
> obj-$(CONFIG_COMMON_CLK) += clk-composite.o
> diff --git a/drivers/clk/clk-gate-test.c b/drivers/clk/clk-gate-test.c
> new file mode 100644
> index 000000000000..b1d6c21e9698
> --- /dev/null
> +++ b/drivers/clk/clk-gate-test.c
> @@ -0,0 +1,481 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * KUnit test for clk gate basic type
Here is the other capitalization.
> + */
> +#include <linux/clk.h>
> +#include <linux/clk-provider.h>
> +#include <linux/platform_device.h>
> +
> +#include <kunit/test.h>
[...]
Cheers!
next prev parent reply other threads:[~2020-04-09 20:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 3:56 [PATCH/RFC] clk: gate: Add some kunit test suites Stephen Boyd
2020-04-09 20:09 ` Brendan Higgins [this message]
2020-04-11 2:10 ` Stephen Boyd
2020-04-14 11:46 ` Vaittinen, Matti
2020-04-29 4:15 ` David Gow
2020-05-04 5:54 ` Vaittinen, Matti
2020-05-04 20:19 ` Brendan Higgins
2020-05-05 6:15 ` Vaittinen, Matti
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=CAFd5g46JHKmrEbYeL_Yu8djPHr-6QwidumLKtdYoYOwC_ALpaQ@mail.gmail.com \
--to=brendanhiggins@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).