/* Make sure mmc6 exists */
ut_asserteq(6, blk_get_device_by_str("mmc", "6", &mmc_dev_desc));
- ut_assertok(console_record_reset_enable());
ut_assertok(run_commandf("mmc dev 6"));
ut_assert_nextline("switch to partitions #0, OK");
ut_assert_nextline("mmc6 is current device");
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/* Make sure mmc6 is 12+ MiB in size */
ut_assertok(run_commandf("mmc read 0x%lx 0x%lx 1", ra, (ulong)0xBFFE00 / 0x200));
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(console_record_reset_enable());
ut_assertf(0 == run_commandf(mbr_parts_buf), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assertok(run_commandf("mbr write mmc 6"));
+ ut_assert_nextlinen("MMC read: dev # 6");
ut_assert_nextline("MBR: write success!");
ut_assertok(run_commandf("mbr verify mmc 6"));
ut_assert_nextline("MBR: verify success!");
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/*
000001b0 00 00 00 00 00 00 00 00 78 56 34 12 00 00 80 05 |........xV4.....|
000001c0 05 01 0e 25 24 01 00 40 00 00 00 08 00 00 00 00 |...%$..@........|
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(console_record_reset_enable());
ut_assertf(0 == run_commandf(mbr_parts_buf), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assertok(run_commandf("mbr write mmc 6"));
ut_assert_nextline("MBR: write success!");
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/*
000001b0 00 00 00 00 00 00 00 00 78 56 34 12 00 00 80 05 |........xV4.....|
000001c0 05 01 0e 25 24 01 00 40 00 00 00 08 00 00 00 25 |...%$..@.......%|
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(console_record_reset_enable());
ut_assertf(0 == run_commandf(mbr_parts_buf), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assertok(run_commandf("mbr write mmc 6"));
ut_assert_nextline("MBR: write success!");
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/*
000001b0 00 00 00 00 00 00 00 00 78 56 34 12 00 00 80 05 |........xV4.....|
000001c0 05 01 0e 25 24 01 00 40 00 00 00 08 00 00 00 25 |...%$..@.......%|
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(console_record_reset_enable());
ut_assertf(0 == run_commandf(mbr_parts_buf), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assertok(run_commandf("mbr write mmc 6"));
ut_assert_nextline("MBR: write success!");
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/*
000001b0 00 00 00 00 00 00 00 00 78 56 34 12 00 00 80 05 |........xV4.....|
000001c0 05 01 0e 25 24 01 00 40 00 00 00 08 00 00 00 25 |...%$..@.......%|
memset(rbuf, 0, sizeof(rbuf));
ut_assertok(run_commandf("read mmc 6:0 0x%lx 0x%lx 1", ra, ebr_blk));
ut_assertok(memcmp(ebr_wbuf, rbuf, 512));
- ut_assertok(console_record_reset_enable());
ut_assertf(0 == run_commandf(mbr_parts_buf), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assertf(0 == run_commandf("mbr write mmc 6"), "Invalid partitions string: %s\n", mbr_parts_buf);
ut_assert_nextline("MBR: write success!");
ut_assertok(run_commandf("mbr verify mmc 6"));
ut_assert_nextline("MBR: verify success!");
- ut_assertok(ut_check_console_end(uts));
+ ut_assert_console_end();
/*
000001b0 00 00 00 00 00 00 00 00 78 56 34 12 00 00 80 05 |........xV4.....|
000001c0 05 01 0e 25 24 01 00 40 00 00 00 08 00 00 00 25 |...%$..@.......%|
}
/* Declare mbr test */
-UNIT_TEST(mbr_test_run, UT_TESTF_CONSOLE_REC, mbr_test);
+UNIT_TEST(mbr_test_run, UTF_CONSOLE, mbr_test);
int do_ut_mbr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
{
return mbr_test_run(uts);
}
-
-DM_TEST(dm_test_cmd_mbr, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC);
+DM_TEST(dm_test_cmd_mbr, UTF_SCAN_FDT | UTF_CONSOLE);