[PATCH v3 4/5] clk: Add KUnit tests for assigned-clock-sscs
Brian Masney
bmasney at redhat.com
Fri Sep 12 07:50:39 PDT 2025
On Fri, Sep 12, 2025 at 11:35:53AM +0800, Peng Fan wrote:
> Spread spectrum configuration is part of clock frequency settings,
> and its behavior can be validated similarly to assigned clock rates.
>
> Extend the existing KUnit tests for assigned-clock-rates to cover
> assigned-clock-sscs by reusing the test framework. Add new test
> device trees:
> - kunit_clk_assigned_sscs_null.dtso
> - kunit_clk_assigned_sscs_null_consumer.dtso
> - kunit_clk_assigned_sscs_without.dtso
> - kunit_clk_assigned_sscs_without_consumer.dtso
> - kunit_clk_assigned_sscs_zero.dtso
> - kunit_clk_assigned_sscs_zero_consumer.dtso
>
> These tests cover various invalid configurations of assigned-clock-sscs,
> ensuring robustness and consistent error handling, similar to the coverage
> provided for assigned-clock-rates.
>
> Co-developed-by: Brian Masney <bmasney at redhat.com>
> Signed-off-by: Brian Masney <bmasney at redhat.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
There's no need to add a Co-developed-by for me. I just gave you a very
rough starting point.
> diff --git a/drivers/clk/kunit_clk_assigned_rates_zero_consumer.dtso b/drivers/clk/kunit_clk_assigned_rates_zero_consumer.dtso
> index 1d964672e8553a90263af400367a2d947f755015..d62c7522c92461245d45f8ac0ebd26fa2850be98 100644
> --- a/drivers/clk/kunit_clk_assigned_rates_zero_consumer.dtso
> +++ b/drivers/clk/kunit_clk_assigned_rates_zero_consumer.dtso
> @@ -12,5 +12,6 @@ kunit-clock-consumer {
> compatible = "test,clk-consumer";
> assigned-clocks = <&clk>;
> assigned-clock-rates = <0>;
> + assigned-clock-sscs = <0 0 0>;
> };
> };
kunit_clk_assigned_rates_zero_consumer.dtso is modified, however
kunit_clk_assigned_rates_zero.dtso was not. The underlying test doesn't
check for this, so you can drop the change to this dtso file.
Everything else looks good to me.
Brian
More information about the linux-arm-kernel
mailing list