Skip to content

Commit 090962b

Browse files
mripardbebarino
authored andcommitted
clk: tests: Add test suites description
We start to have a few test suites, and we'll add more, so it will get pretty confusing to figure out what is supposed to be tested in what suite. Let's add some comments to explain what setup they create, and what we should be testing in every suite. Tested-by: Alexander Stein <[email protected]> # imx8mp Tested-by: Marek Szyprowski <[email protected]> # exynos4210, meson g12b Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Linux Kernel Functional Testing <[email protected]> Tested-by: Naresh Kamboju <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent bde8870 commit 090962b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

drivers/clk/clk_test.c

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ static struct kunit_case clk_test_cases[] = {
258258
{}
259259
};
260260

261+
/*
262+
* Test suite for a basic rate clock, without any parent.
263+
*
264+
* These tests exercise the rate API with simple scenarios
265+
*/
261266
static struct kunit_suite clk_test_suite = {
262267
.name = "clk-test",
263268
.init = clk_test_init,
@@ -346,6 +351,14 @@ static struct kunit_case clk_orphan_transparent_single_parent_mux_test_cases[] =
346351
{}
347352
};
348353

354+
/*
355+
* Test suite for a basic mux clock with one parent. The parent is
356+
* registered after its child. The clock will thus be an orphan when
357+
* registered, but will no longer be when the tests run.
358+
*
359+
* These tests make sure a clock that used to be orphan has a sane,
360+
* consistent, behaviour.
361+
*/
349362
static struct kunit_suite clk_orphan_transparent_single_parent_test_suite = {
350363
.name = "clk-orphan-transparent-single-parent-test",
351364
.init = clk_orphan_transparent_single_parent_mux_test_init,
@@ -675,6 +688,12 @@ static struct kunit_case clk_range_test_cases[] = {
675688
{}
676689
};
677690

691+
/*
692+
* Test suite for a basic rate clock, without any parent.
693+
*
694+
* These tests exercise the rate range API: clk_set_rate_range(),
695+
* clk_set_min_rate(), clk_set_max_rate(), clk_drop_range().
696+
*/
678697
static struct kunit_suite clk_range_test_suite = {
679698
.name = "clk-range-test",
680699
.init = clk_test_init,
@@ -856,6 +875,13 @@ static struct kunit_case clk_range_maximize_test_cases[] = {
856875
{}
857876
};
858877

878+
/*
879+
* Test suite for a basic rate clock, without any parent.
880+
*
881+
* These tests exercise the rate range API: clk_set_rate_range(),
882+
* clk_set_min_rate(), clk_set_max_rate(), clk_drop_range(), with a
883+
* driver that will always try to run at the highest possible rate.
884+
*/
859885
static struct kunit_suite clk_range_maximize_test_suite = {
860886
.name = "clk-range-maximize-test",
861887
.init = clk_maximize_test_init,
@@ -1029,6 +1055,13 @@ static struct kunit_case clk_range_minimize_test_cases[] = {
10291055
{}
10301056
};
10311057

1058+
/*
1059+
* Test suite for a basic rate clock, without any parent.
1060+
*
1061+
* These tests exercise the rate range API: clk_set_rate_range(),
1062+
* clk_set_min_rate(), clk_set_max_rate(), clk_drop_range(), with a
1063+
* driver that will always try to run at the lowest possible rate.
1064+
*/
10321065
static struct kunit_suite clk_range_minimize_test_suite = {
10331066
.name = "clk-range-minimize-test",
10341067
.init = clk_minimize_test_init,

0 commit comments

Comments
 (0)