diff options
Diffstat (limited to 'test/boot/bootstd_common.c')
-rw-r--r-- | test/boot/bootstd_common.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/boot/bootstd_common.c b/test/boot/bootstd_common.c index 7a40836507a..e71a2975c53 100644 --- a/test/boot/bootstd_common.c +++ b/test/boot/bootstd_common.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <bootdev.h> #include <bootstd.h> #include <dm.h> #include <memalign.h> @@ -67,6 +68,24 @@ int bootstd_test_drop_bootdev_order(struct unit_test_state *uts) return 0; } +int bootstd_test_check_mmc_hunter(struct unit_test_state *uts) +{ + struct bootdev_hunter *start, *mmc; + struct bootstd_priv *std; + uint seq; + + /* get access to the used hunters */ + ut_assertok(bootstd_get_priv(&std)); + + /* check that the hunter was used */ + start = ll_entry_start(struct bootdev_hunter, bootdev_hunter); + mmc = BOOTDEV_HUNTER_GET(mmc_bootdev_hunter); + seq = mmc - start; + ut_asserteq(BIT(seq), std->hunters_used); + + return 0; +} + int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd_test); |