test: dm: Use UTF_CONSOLE in tests

Set this flag rather than doing things manually in the test.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 4c5f8b5..7ccd7f8 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -389,7 +389,6 @@
 
 	ut_assertok(acpi_write_dev_tables(&ctx));
 
-	console_record_reset();
 	run_command("acpi list", 0);
 	ut_assert_nextline("Name              Base   Size  Detail");
 	ut_assert_nextline("----  ----------------  -----  ----------------------------");
@@ -416,7 +415,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_acpi_cmd_list, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_acpi_cmd_list, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Test 'acpi dump' command */
 static int dm_test_acpi_cmd_dump(struct unit_test_state *uts)
@@ -433,13 +432,11 @@
 	ut_assertok(acpi_write_dev_tables(&ctx));
 
 	/* First search for a non-existent table */
-	console_record_reset();
 	run_command("acpi dump rdst", 0);
 	ut_assert_nextline("Table 'RDST' not found");
 	ut_assert_console_end();
 
 	/* Now a real table */
-	console_record_reset();
 	run_command("acpi dump dmar", 0);
 	addr = ALIGN(nomap_to_sysmem(ctx.xsdt) + sizeof(struct acpi_xsdt), 64);
 	ut_assert_nextline("DMAR @ %16lx", addr);
@@ -448,7 +445,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_acpi_cmd_dump, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_acpi_cmd_dump, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Test acpi_device_path() */
 static int dm_test_acpi_device_path(struct unit_test_state *uts)
@@ -575,7 +572,6 @@
 	acpi_reset_items();
 	ctx.current = buf;
 	ut_assertok(acpi_fill_ssdt(&ctx));
-	console_record_reset();
 	run_command("acpi items", 0);
 	ut_assert_nextline("Seq  Type       Base   Size  Device/Writer");
 	ut_assert_nextline("---  -----  --------   ----  -------------");
@@ -586,7 +582,6 @@
 	acpi_reset_items();
 	ctx.current = buf;
 	ut_assertok(acpi_inject_dsdt(&ctx));
-	console_record_reset();
 	run_command("acpi items", 0);
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
@@ -594,7 +589,6 @@
 	ut_assert_nextline("  1  dsdt   %8lx      2  acpi-test2", addr + 2);
 	ut_assert_console_end();
 
-	console_record_reset();
 	run_command("acpi items -d", 0);
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
@@ -608,7 +602,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_acpi_cmd_items, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_acpi_cmd_items, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Test 'acpi set' command */
 static int dm_test_acpi_cmd_set(struct unit_test_state *uts)
@@ -619,7 +613,6 @@
 
 	gd_set_acpi_start(0);
 
-	console_record_reset();
 	ut_asserteq(0, gd_acpi_start());
 	ut_assertok(run_command("acpi set", 0));
 	ut_assert_nextline("ACPI pointer: 0");
@@ -646,7 +639,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_acpi_cmd_set, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_acpi_cmd_set, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /**
  * dm_test_write_test_table() - create test ACPI table
diff --git a/test/dm/blkmap.c b/test/dm/blkmap.c
index 7581e62..a6a0b4d 100644
--- a/test/dm/blkmap.c
+++ b/test/dm/blkmap.c
@@ -165,8 +165,6 @@
 	ulong loadaddr = env_get_hex("loadaddr", 0);
 	struct udevice *dev;
 
-	console_record_reset();
-
 	ut_assertok(run_command("blkmap info", 0));
 	ut_assert_console_end();
 
@@ -197,4 +195,4 @@
 	ut_assert_console_end();
 	return 0;
 }
-DM_TEST(dm_test_cmd_blkmap, 0);
+DM_TEST(dm_test_cmd_blkmap, UTF_CONSOLE);
diff --git a/test/dm/cros_ec.c b/test/dm/cros_ec.c
index 1108af4..089f667 100644
--- a/test/dm/cros_ec.c
+++ b/test/dm/cros_ec.c
@@ -38,14 +38,13 @@
 	ut_asserteq(1234, cros_ec_get_sku_id(dev));
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec sku", 0));
 	ut_assert_nextline("1234");
 	ut_assert_console_end();
 
 	return 0;
 }
-DM_TEST(dm_test_cros_ec_sku_id, UTF_SCAN_FDT);
+DM_TEST(dm_test_cros_ec_sku_id, UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_cros_ec_features(struct unit_test_state *uts)
 {
@@ -64,7 +63,6 @@
 	ut_asserteq(true, cros_ec_check_feature(dev, EC_FEATURE_ISH));
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec features", 0));
 	ut_assert_nextline("flash");
 	ut_assert_nextline("i2c");
@@ -75,7 +73,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_cros_ec_features, UTF_SCAN_FDT);
+DM_TEST(dm_test_cros_ec_features, UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_cros_ec_switches(struct unit_test_state *uts)
 {
@@ -85,7 +83,6 @@
 	ut_asserteq(0, cros_ec_get_switches(dev));
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec switches", 0));
 	ut_assert_console_end();
 
@@ -94,14 +91,13 @@
 	ut_asserteq(EC_SWITCH_LID_OPEN, cros_ec_get_switches(dev));
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec switches", 0));
 	ut_assert_nextline("lid open");
 	ut_assert_console_end();
 
 	return 0;
 }
-DM_TEST(dm_test_cros_ec_switches, UTF_SCAN_FDT);
+DM_TEST(dm_test_cros_ec_switches, UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_cros_ec_events(struct unit_test_state *uts)
 {
@@ -113,7 +109,6 @@
 	ut_asserteq(0, events);
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec events", 0));
 	ut_assert_nextline("00000000");
 	ut_assert_console_end();
@@ -124,7 +119,6 @@
 	ut_asserteq(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN), events);
 
 	/* try the command */
-	console_record_reset();
 	ut_assertok(run_command("crosec events", 0));
 	ut_assert_nextline("00000002");
 	ut_assert_nextline("lid_open");
@@ -138,7 +132,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_cros_ec_events, UTF_SCAN_FDT);
+DM_TEST(dm_test_cros_ec_events, UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_cros_ec_vstore(struct unit_test_state *uts)
 {
diff --git a/test/dm/host.c b/test/dm/host.c
index ff6f43b..f577377 100644
--- a/test/dm/host.c
+++ b/test/dm/host.c
@@ -115,8 +115,6 @@
 	struct blk_desc *desc;
 	char fname[256];
 
-	console_record_reset();
-
 	/* first check 'host info' with binding */
 	ut_assertok(run_command("host info", 0));
 	ut_assert_nextline("dev       blocks  blksz label           path");
@@ -199,4 +197,4 @@
 
 	return 0;
 }
-DM_TEST(dm_test_cmd_host, UTF_SCAN_FDT);
+DM_TEST(dm_test_cmd_host, UTF_SCAN_FDT | UTF_CONSOLE);
diff --git a/test/dm/mux-cmd.c b/test/dm/mux-cmd.c
index 3aadc15..6eb3b28 100644
--- a/test/dm/mux-cmd.c
+++ b/test/dm/mux-cmd.c
@@ -109,7 +109,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_cmd_mux_list, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_cmd_mux_list, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_cmd_mux_select(struct unit_test_state *uts)
 {
diff --git a/test/dm/rng.c b/test/dm/rng.c
index 8ed4e13..d7ef072 100644
--- a/test/dm/rng.c
+++ b/test/dm/rng.c
@@ -33,8 +33,6 @@
 	ut_assertok(uclass_get_device(UCLASS_RNG, 0, &dev));
 	ut_assertnonnull(dev);
 
-	ut_assertok(console_record_reset_enable());
-
 	run_command("rng", 0);
 	ut_assert_nextlinen("00000000:");
 	ut_assert_nextlinen("00000010:");
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index e52abbc..88f080b 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -191,8 +191,6 @@
 /* Test 'rtc list' command */
 static int dm_test_rtc_cmd_list(struct unit_test_state *uts)
 {
-	console_record_reset();
-
 	run_command("rtc list", 0);
 	ut_assert_nextline("RTC #0 - rtc@43");
 	ut_assert_nextline("RTC #1 - rtc@61");
@@ -200,13 +198,11 @@
 
 	return 0;
 }
-DM_TEST(dm_test_rtc_cmd_list, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_rtc_cmd_list, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Test 'rtc read' and 'rtc write' commands */
 static int dm_test_rtc_cmd_rw(struct unit_test_state *uts)
 {
-	console_record_reset();
-
 	run_command("rtc dev 0", 0);
 	ut_assert_nextline("RTC #0 - rtc@43");
 	ut_assert_console_end();
@@ -243,7 +239,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_rtc_cmd_rw, UTF_SCAN_PDATA | UTF_SCAN_FDT);
+DM_TEST(dm_test_rtc_cmd_rw, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Reset the time */
 static int dm_test_rtc_reset(struct unit_test_state *uts)
diff --git a/test/dm/scmi.c b/test/dm/scmi.c
index 5c540fc..3655594 100644
--- a/test/dm/scmi.c
+++ b/test/dm/scmi.c
@@ -281,7 +281,7 @@
 
 	return 0;
 }
-DM_TEST(dm_test_scmi_cmd, UTF_SCAN_FDT);
+DM_TEST(dm_test_scmi_cmd, UTF_SCAN_FDT | UTF_CONSOLE);
 
 static int dm_test_scmi_power_domains(struct unit_test_state *uts)
 {