From 753e5385ca6d0fe5b5f5a3a97cc96b0f2469ca94 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 19 Aug 2019 11:06:13 +0200 Subject: test/py: Add cmd_memory dependency back to test_mmc_wr Based on discussion with Stephen Warren there was recommendation to list both memory and random command dependencies just in case that dependency is not properly handled by Kconfig. Fixes: a09c1f7e1c1b ("test/py: Fix MMC/SD block write test dependency") Signed-off-by: Michal Simek Acked-by: Stephen Warren --- test/py/tests/test_mmc_wr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/py/tests/test_mmc_wr.py b/test/py/tests/test_mmc_wr.py index 7678c3c9c18..8b18781eac7 100644 --- a/test/py/tests/test_mmc_wr.py +++ b/test/py/tests/test_mmc_wr.py @@ -35,7 +35,7 @@ env__mmc_wr_configs = ( """ -@pytest.mark.buildconfigspec('cmd_mmc','cmd_random') +@pytest.mark.buildconfigspec('cmd_mmc','cmd_memory', 'cmd_random') def test_mmc_wr(u_boot_console, env__mmc_wr_config): """Test the "mmc write" command. -- cgit v1.2.3 From c66f4f5e3018e7df5249ae7e100ad85d9d2cb33f Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 21 Aug 2019 13:35:19 +0000 Subject: sandbox: clk: add clk enable/disable test code Since we added clk enable_count and prograte clk child enabling operation to clk parent, so add a new function sandbox_clk_enable_count to get enable_count for test usage. And add test code to get the enable_count after we enable/disable the device clk. Signed-off-by: Peng Fan --- test/dm/clk_ccf.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test') diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index bbc4b500e83..ae3a4d8a76a 100644 --- a/test/dm/clk_ccf.c +++ b/test/dm/clk_ccf.c @@ -64,6 +64,34 @@ static int dm_test_clk_ccf(struct unit_test_state *uts) rate = clk_get_rate(clk); ut_asserteq(rate, 60000000); +#if CONFIG_IS_ENABLED(CLK_CCF) + /* Test clk tree enable/disable */ + ret = clk_get_by_id(SANDBOX_CLK_I2C_ROOT, &clk); + ut_assertok(ret); + ut_asserteq_str("i2c_root", clk->dev->name); + + ret = clk_enable(clk); + ut_assertok(ret); + + ret = sandbox_clk_enable_count(clk); + ut_asserteq(ret, 1); + + ret = clk_get_by_id(SANDBOX_CLK_I2C, &pclk); + ut_assertok(ret); + + ret = sandbox_clk_enable_count(pclk); + ut_asserteq(ret, 1); + + ret = clk_disable(clk); + ut_assertok(ret); + + ret = sandbox_clk_enable_count(clk); + ut_asserteq(ret, 0); + + ret = sandbox_clk_enable_count(pclk); + ut_asserteq(ret, 0); +#endif + return 1; } -- cgit v1.2.3