summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2023-10-07 23:41:06 +0200
committerTom Rini <trini@konsulko.com>2023-12-09 08:42:29 -0500
commit3ff2d796a6f251637c3ee71bb7f1e3d6964dafa2 (patch)
treefb16ba79b84d09d7a7f8116a788a03317f78b101
parent2696f3ab8101d0037b4fca9b982595b2f935946d (diff)
downloadu-boot-3ff2d796a6f251637c3ee71bb7f1e3d6964dafa2.tar.gz
u-boot-3ff2d796a6f251637c3ee71bb7f1e3d6964dafa2.tar.bz2
u-boot-3ff2d796a6f251637c3ee71bb7f1e3d6964dafa2.zip
test: bdinfo: Test bdinfo -e
The bdinfo -e should print only the board ethernet settings. Test the expected output. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
-rw-r--r--test/cmd/bdinfo.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c
index c9be182e37..9744bd16df 100644
--- a/test/cmd/bdinfo.c
+++ b/test/cmd/bdinfo.c
@@ -263,6 +263,20 @@ static int bdinfo_test_memory(struct unit_test_state *uts)
BDINFO_TEST(bdinfo_test_memory, UT_TESTF_CONSOLE_REC);
+static int bdinfo_test_eth(struct unit_test_state *uts)
+{
+ /* Test BDINFO ethernet settings only print */
+ ut_assertok(console_record_reset_enable());
+ ut_assertok(run_commandf("bdinfo -e"));
+ if (IS_ENABLED(CONFIG_CMD_NET))
+ ut_assertok(test_eth(uts));
+ ut_assertok(ut_check_console_end(uts));
+
+ return 0;
+}
+
+BDINFO_TEST(bdinfo_test_eth, UT_TESTF_CONSOLE_REC);
+
int do_ut_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct unit_test *tests = UNIT_TEST_SUITE_START(bdinfo_test);