Skip to content

Commit 5776526

Browse files
committed
clk: Add KUnit tests for clk fixed rate basic type
Test that the fixed rate basic type clk works as intended. Cc: Brendan Higgins <[email protected]> Cc: David Gow <[email protected]> Cc: Rae Moar <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d690bd1 commit 5776526

File tree

6 files changed

+420
-0
lines changed

6 files changed

+420
-0
lines changed

drivers/clk/.kunitconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
CONFIG_KUNIT=y
2+
CONFIG_OF=y
23
CONFIG_COMMON_CLK=y
34
CONFIG_CLK_KUNIT_TEST=y
5+
CONFIG_CLK_FIXED_RATE_KUNIT_TEST=y
46
CONFIG_CLK_GATE_KUNIT_TEST=y
57
CONFIG_CLK_FD_KUNIT_TEST=y
68
CONFIG_UML_PCI_OVER_VIRTIO=n

drivers/clk/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,15 @@ config CLK_KUNIT_TEST
512512
help
513513
Kunit tests for the common clock framework.
514514

515+
config CLK_FIXED_RATE_KUNIT_TEST
516+
tristate "Basic fixed rate clk type KUnit test" if !KUNIT_ALL_TESTS
517+
depends on KUNIT
518+
default KUNIT_ALL_TESTS
519+
select OF_OVERLAY if OF
520+
select DTC
521+
help
522+
KUnit tests for the basic fixed rate clk type.
523+
515524
config CLK_GATE_KUNIT_TEST
516525
tristate "Basic gate type Kunit test" if !KUNIT_ALL_TESTS
517526
depends on KUNIT

drivers/clk/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ obj-$(CONFIG_CLK_KUNIT_TEST) += clk_test.o
66
obj-$(CONFIG_COMMON_CLK) += clk-divider.o
77
obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o
88
obj-$(CONFIG_COMMON_CLK) += clk-fixed-rate.o
9+
obj-$(CONFIG_CLK_FIXED_RATE_KUNIT_TEST) += clk-fixed-rate-test.o
10+
clk-fixed-rate-test-y := clk-fixed-rate_test.o kunit_clk_fixed_rate_test.dtbo.o
911
obj-$(CONFIG_COMMON_CLK) += clk-gate.o
1012
obj-$(CONFIG_CLK_GATE_KUNIT_TEST) += clk-gate_test.o
1113
obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o

0 commit comments

Comments
 (0)