diff options
author | Simon Glass <sjg@chromium.org> | 2024-08-22 07:54:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-23 15:58:41 -0600 |
commit | dfc0acd0cc3cd14f64cb6850465ade98ea84b366 (patch) | |
tree | 91bf8132534a60dd28b1aab0c8bf0f80f8996863 /test/cmd/pinmux.c | |
parent | 99b23d45cb7f028067a77845e46cb09801e1b9e1 (diff) |
log: Avoid including function names by default
Unless function names are requested, the logging system should not
compile these into the code. Adjust the macros to handle this.
This means that turning on function names at runtime won't work unless
CONFIG_LOGF_FUNC is enabled. We could perhaps split this into a
separate option if that is a problem.
Enable CONFIG_LOGF_FUNC logging for sandbox since the tests expect the
function names to be included. Fix up the pinmux test which checks a
logging statement.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Diffstat (limited to 'test/cmd/pinmux.c')
-rw-r--r-- | test/cmd/pinmux.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/cmd/pinmux.c b/test/cmd/pinmux.c index 4253baa5646..7ab7004b684 100644 --- a/test/cmd/pinmux.c +++ b/test/cmd/pinmux.c @@ -30,7 +30,13 @@ static int dm_test_cmd_pinmux_status_pinname(struct unit_test_state *uts) 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(); |