aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJassi Brar2023-03-06 17:18:58 -0600
committerTom Rini2023-06-09 13:52:40 -0400
commit72168b929e0fb69aa0a133703ad9dee02c7aa561 (patch)
tree3a3272b490043657cd877baa2ec7379a4dda117a /test
parent1e917a69e51dc27627dd667a70843cb0ac270849 (diff)
test: dm: fwu: fix for the updated api
fwu_get_mdata() no more requires 'dev' argument and fwu_check_mdata_validity() has been rendered useless and dropped. Fix the test cases to work with aforementioned changes. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/fwu_mdata.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/test/dm/fwu_mdata.c b/test/dm/fwu_mdata.c
index b179a65c154..8b5c83ef4e2 100644
--- a/test/dm/fwu_mdata.c
+++ b/test/dm/fwu_mdata.c
@@ -98,7 +98,7 @@ static int dm_test_fwu_mdata_read(struct unit_test_state *uts)
ut_assertok(populate_mmc_disk_image(uts));
ut_assertok(write_mmc_blk_device(uts));
- ut_assertok(fwu_get_mdata(dev, &mdata));
+ ut_assertok(fwu_get_mdata(&mdata));
ut_asserteq(mdata.version, 0x1);
@@ -118,30 +118,14 @@ static int dm_test_fwu_mdata_write(struct unit_test_state *uts)
ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev));
- ut_assertok(fwu_get_mdata(dev, &mdata));
+ ut_assertok(fwu_get_mdata(&mdata));
active_idx = (mdata.active_index + 1) % CONFIG_FWU_NUM_BANKS;
ut_assertok(fwu_set_active_index(active_idx));
- ut_assertok(fwu_get_mdata(dev, &mdata));
+ ut_assertok(fwu_get_mdata(&mdata));
ut_asserteq(mdata.active_index, active_idx);
return 0;
}
DM_TEST(dm_test_fwu_mdata_write, UT_TESTF_SCAN_FDT);
-
-static int dm_test_fwu_mdata_check(struct unit_test_state *uts)
-{
- struct udevice *dev;
-
- ut_assertok(setup_blk_device(uts));
- ut_assertok(populate_mmc_disk_image(uts));
- ut_assertok(write_mmc_blk_device(uts));
-
- ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev));
-
- ut_assertok(fwu_check_mdata_validity());
-
- return 0;
-}
-DM_TEST(dm_test_fwu_mdata_check, UT_TESTF_SCAN_FDT);