From: Tom Rini Date: Tue, 27 Aug 2024 00:52:18 +0000 (-0600) Subject: Merge patch series "Tidy up console recording in tests" X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=9735cfaf904551759597067d76e2ae2ec21d582a;p=u-boot.git Merge patch series "Tidy up console recording in tests" Simon Glass says: This series started as a small fix for checking for an empty line, but in the process several other problems were found and fixed: - fix tests which use console recording but don't set the flag - drop unnecessary resetting of the console in tests - drop unnecessary blank line before MMC output - update the docs a little - fix buildman test failure on newer Pythons - a few other minor things This series also renames the confusing flag names, so that they are easier to remember - just a UTF_ (unit-test flags) prefix. --- 9735cfaf904551759597067d76e2ae2ec21d582a diff --cc test/cmd/pinmux.c index 7ab7004b68,be39dbc61b..65974d03f8 --- a/test/cmd/pinmux.c +++ b/test/cmd/pinmux.c @@@ -28,15 -26,8 +26,14 @@@ static int dm_test_cmd_pinmux_status_pi ut_assert_nextlinen("P7 : GPIO2 bias-pull-down input-enable."); ut_assert_console_end(); - console_record_reset(); run_command("pinmux status P9", 0); - ut_assert_nextlinen("single-pinctrl pinctrl-single-no-width: missing register width"); + if (IS_ENABLED(CONFIG_LOGF_FUNC)) { + ut_assert_nextlinen( + " single_of_to_plat() single-pinctrl pinctrl-single-no-width: missing register width"); + } else { + ut_assert_nextlinen( + "single-pinctrl pinctrl-single-no-width: missing register width"); + } ut_assert_nextlinen("P9 not found"); ut_assert_console_end(); diff --cc test/log/log_test.c index 18f8a2d939,59040c1327..1c89df4ef1 --- a/test/log/log_test.c +++ b/test/log/log_test.c @@@ -377,11 -363,10 +363,10 @@@ int log_test_level_deny(struct unit_tes LOGFF_DENY); ut_assert(filt2 >= 0); - ut_assertok(console_record_reset_enable()); log_run(); - check_log_entries_flags_levels(EXPECT_LOG | EXPECT_DIRECT | EXPECT_FORCE, - LOGL_WARNING + 1, - min(gd->default_log_level, LOGL_INFO)); + check_log_entries_flags_levels( + EXPECT_LOG | EXPECT_DIRECT | EXPECT_FORCE, + LOGL_WARNING + 1, min((int)gd->default_log_level, LOGL_INFO)); ut_assertok(log_remove_filter("console", filt1)); ut_assertok(log_remove_filter("console", filt2));