Re: [PATCH v10 4/6] clk: Add KUnit tests for assigned-clock-sscs
Brian Masney <[email protected]> Mon, 15 Jun 2026 12:40:49 -0400
| Newsgroups | org.kernel.vger.arm-scmi,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-clk,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jun 12, 2026 at 04:46:26PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan <[email protected]> > > Add KUnit test coverage for the assigned-clock-sscs DT property that > configures spread spectrum on clocks before they are used. > > Extend the existing test infrastructure to support spread spectrum: > - Add struct clk_spread_spectrum field to clk_dummy_context and a > clk_dummy_set_spread_spectrum callback > - Wire set_spread_spectrum into all dummy clock ops > - Extend clk_assigned_rates_register_clk and test parameter struct > to propagate initial SSCS values > > Add a new separate test suite clk_assigned_sscs with three categories: > > 1. clk_assigned_sscs_assigns_one — verifies that a single > assigned-clock-sscs entry correctly configures spread spectrum > on one clock, testing both provider and consumer paths > > 2. clk_assigned_sscs_assigns_multiple — verifies that multiple > assigned-clock-sscs entries configure spread spectrum on two > clocks, testing both provider and consumer paths > > 3. clk_assigned_sscs_skips — verifies that malformed DT properties > are correctly skipped without error: missing assigned-clocks, > zero-valued SSCS, and null phandles, tested for both provider > and consumer scenarios > > New DT overlays are added for all test scenarios: > - kunit_clk_assigned_sscs_one{,consumer} — single valid entry > - kunit_clk_assigned_sscs_multiple{,consumer} — two valid entries > - kunit_clk_assigned_sscs_without{,consumer} — missing assigned-clocks > - kunit_clk_assigned_sscs_zero{,consumer} — all-zero SSCS values > - kunit_clk_assigned_sscs_null{,consumer} — null phandle > > Co-developed-by: Brian Masney <[email protected]> > Signed-off-by: Brian Masney <[email protected]> > Signed-off-by: Peng Fan <[email protected]> Looks good to me. It's probably not appropriate for me to also put a Reviewed-by here. Brian