summaryrefslogtreecommitdiff
path: root/test/boot/bootflow.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
committerTom Rini <trini@konsulko.com>2025-01-08 14:19:22 -0600
commit3bfd12008bef1a8353e7ceaca2cb06cf388527ed (patch)
treeac25e8db2f18bcba9f48518249fc020a05cb576c /test/boot/bootflow.c
parent6d41f0a39d6423c8e57e92ebbe9f8c0333a63f72 (diff)
parentd6da3dbaef57fc1d319b6b552efa009e2489d7d9 (diff)
Merge branch 'next'
Diffstat (limited to 'test/boot/bootflow.c')
-rw-r--r--test/boot/bootflow.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index da713d8ed72..e33b08aa8cd 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -1199,8 +1199,8 @@ static int bootflow_cros(struct unit_test_state *uts)
}
BOOTSTD_TEST(bootflow_cros, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT);
-/* Test Android bootmeth */
-static int bootflow_android(struct unit_test_state *uts)
+/* Test Android bootmeth with boot image version 4 */
+static int bootflow_android_image_v4(struct unit_test_state *uts)
{
if (!IS_ENABLED(CONFIG_BOOTMETH_ANDROID))
return -EAGAIN;
@@ -1220,7 +1220,30 @@ static int bootflow_android(struct unit_test_state *uts)
return 0;
}
-BOOTSTD_TEST(bootflow_android, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT);
+BOOTSTD_TEST(bootflow_android_image_v4, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT);
+
+/* Test Android bootmeth with boot image version 2 */
+static int bootflow_android_image_v2(struct unit_test_state *uts)
+{
+ if (!IS_ENABLED(CONFIG_BOOTMETH_ANDROID))
+ return -EAGAIN;
+
+ ut_assertok(scan_mmc_android_bootdev(uts, "mmc8"));
+ ut_assertok(run_command("bootflow list", 0));
+
+ ut_assert_nextlinen("Showing all");
+ ut_assert_nextlinen("Seq");
+ ut_assert_nextlinen("---");
+ ut_assert_nextlinen(" 0 extlinux");
+ ut_assert_nextlinen(" 1 android ready mmc 0 mmc8.bootdev.whole ");
+ ut_assert_nextlinen("---");
+ ut_assert_skip_to_line("(2 bootflows, 2 valid)");
+
+ ut_assert_console_end();
+
+ return 0;
+}
+BOOTSTD_TEST(bootflow_android_image_v2, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT);
/* Test EFI bootmeth */
static int bootflow_efi(struct unit_test_state *uts)