]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: bloblist: Use UTF_CONSOLE in tests
authorSimon Glass <sjg@chromium.org>
Thu, 22 Aug 2024 13:57:53 +0000 (07:57 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 27 Aug 2024 00:51:49 +0000 (18:51 -0600)
Set this flag rather than doing things manually in the test.

Drop the code which is now unnecessary.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/bloblist.c

index 7c63682908a579c6427ecdfd9ccd4241f2afc71f..fd85c7ab79ea2b94919545f236224ef266b6862a 100644 (file)
@@ -270,20 +270,15 @@ static int bloblist_test_cmd_info(struct unit_test_state *uts)
        data = bloblist_ensure(TEST_TAG, TEST_SIZE);
        data2 = bloblist_ensure(TEST_TAG2, TEST_SIZE2);
 
-       console_record_reset_enable();
-       ut_silence_console(uts);
-       console_record_reset();
        run_command("bloblist info", 0);
        ut_assert_nextline("base:       %lx", (ulong)map_to_sysmem(hdr));
        ut_assert_nextline("total size: 400    1 KiB");
        ut_assert_nextline("used size:  50     80 Bytes");
        ut_assert_nextline("free:       3b0    944 Bytes");
-       ut_assert_console_end();
-       ut_unsilence_console(uts);
 
        return 0;
 }
-BLOBLIST_TEST(bloblist_test_cmd_info, 0);
+BLOBLIST_TEST(bloblist_test_cmd_info, UTF_CONSOLE);
 
 /* Test the 'bloblist list' command */
 static int bloblist_test_cmd_list(struct unit_test_state *uts)
@@ -296,21 +291,16 @@ static int bloblist_test_cmd_list(struct unit_test_state *uts)
        data = bloblist_ensure(TEST_TAG, TEST_SIZE);
        data2 = bloblist_ensure(TEST_TAG2, TEST_SIZE2);
 
-       console_record_reset_enable();
-       ut_silence_console(uts);
-       console_record_reset();
        run_command("bloblist list", 0);
        ut_assert_nextline("Address       Size   Tag Name");
        ut_assert_nextline("%08lx  %8x  fff000 SPL hand-off",
                           (ulong)map_to_sysmem(data), TEST_SIZE);
        ut_assert_nextline("%08lx  %8x   202 Chrome OS vboot context",
                           (ulong)map_to_sysmem(data2), TEST_SIZE2);
-       ut_assert_console_end();
-       ut_unsilence_console(uts);
 
        return 0;
 }
-BLOBLIST_TEST(bloblist_test_cmd_list, 0);
+BLOBLIST_TEST(bloblist_test_cmd_list, UTF_CONSOLE);
 
 /* Test alignment of bloblist blobs */
 static int bloblist_test_align(struct unit_test_state *uts)