aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBin Meng <bmeng@tinylab.org>2023-09-26 16:43:36 +0800
committerTom Rini <trini@konsulko.com>2023-10-10 16:25:48 -0400
commit256f6da8cfbb0349fda9bc4a3fcfd74e5f5d8465 (patch)
tree67b068e3e06fb02e00cc8fe2b44080124b3bd39b /test
parente261fbf347854c75de50dd410904b436d49a7636 (diff)
downloadu-boot-256f6da8cfbb0349fda9bc4a3fcfd74e5f5d8465.zip
u-boot-256f6da8cfbb0349fda9bc4a3fcfd74e5f5d8465.tar.gz
u-boot-256f6da8cfbb0349fda9bc4a3fcfd74e5f5d8465.tar.bz2
cmd: host: Print out the block size of the host device
It's useful if we can print out the block size of the host device in the "host info" command. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/dm/host.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/dm/host.c b/test/dm/host.c
index 4f623d9..ca05a36 100644
--- a/test/dm/host.c
+++ b/test/dm/host.c
@@ -120,7 +120,7 @@ static int dm_test_cmd_host(struct unit_test_state *uts)
/* first check 'host info' with binding */
ut_assertok(run_command("host info", 0));
- ut_assert_nextline("dev blocks label path");
+ ut_assert_nextline("dev blocks blksz label path");
ut_assert_console_end();
ut_assertok(os_persistent_file(fname, sizeof(fname), "2MB.ext2.img"));
@@ -133,8 +133,8 @@ static int dm_test_cmd_host(struct unit_test_state *uts)
ut_asserteq(true, desc->removable);
ut_assertok(run_command("host info", 0));
- ut_assert_nextline("dev blocks label path");
- ut_assert_nextlinen(" 0 4096 test2");
+ ut_assert_nextline("dev blocks blksz label path");
+ ut_assert_nextlinen(" 0 4096 512 test2");
ut_assert_console_end();
ut_assertok(os_persistent_file(fname, sizeof(fname), "1MB.fat32.img"));
@@ -147,9 +147,9 @@ static int dm_test_cmd_host(struct unit_test_state *uts)
ut_asserteq(false, desc->removable);
ut_assertok(run_command("host info", 0));
- ut_assert_nextline("dev blocks label path");
- ut_assert_nextlinen(" 0 4096 test2");
- ut_assert_nextlinen(" 1 2048 fat");
+ ut_assert_nextline("dev blocks blksz label path");
+ ut_assert_nextlinen(" 0 4096 512 test2");
+ ut_assert_nextlinen(" 1 2048 512 fat");
ut_assert_console_end();
ut_asserteq(1, run_command("host info test", 0));
@@ -157,8 +157,8 @@ static int dm_test_cmd_host(struct unit_test_state *uts)
ut_assert_console_end();
ut_assertok(run_command("host info fat", 0));
- ut_assert_nextline("dev blocks label path");
- ut_assert_nextlinen(" 1 2048 fat");
+ ut_assert_nextline("dev blocks blksz label path");
+ ut_assert_nextlinen(" 1 2048 512 fat");
ut_assert_console_end();
/* check 'host dev' */
@@ -194,8 +194,8 @@ static int dm_test_cmd_host(struct unit_test_state *uts)
ut_assert_console_end();
ut_assertok(run_command("host info", 0));
- ut_assert_nextline("dev blocks label path");
- ut_assert_nextlinen(" 1 2048 fat");
+ ut_assert_nextline("dev blocks blksz label path");
+ ut_assert_nextlinen(" 1 2048 512 fat");
ut_assert_console_end();
return 0;