New filter "TOOLCHAIN_HAS_NEWLIB == 1" was applied
because of following chain of dependencies:
LOG_MIPI_SYST_ENABLE=y --> CONFIG_MIPI_SYST_LIB --> \
--> REQUIRES_FULL_LIBC --> NEWLIB_LIBC.
Not all compillers announced in Zephyr support NewLib.
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
The log_link tests are meant to work with 2 mock log backends.
But Intel ADSP platform has an extra default backend named
"log_backend_adsp" when CONFIG_LOG_BACKEND_ADSP=y, which will
mess things up.
Fix it by disabling the default backend.
Signed-off-by: Ming Shao <ming.shao@intel.com>
Added test which validates that messages are processed in
expected order. Order depends on link configuration. If link
is using dedicated mpsc_pbuf then processing order is
based on timestamp. When single mpsc_pbuf is used then order
is derived from message arrival order.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Adding multidomain support by introducing log_link module which
acts as a receiver of log messages created by another domain.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
To enable custom formatting of the log output while still using existing
backend, this commit adds the `log_output_custom` feature.
To use, register a commit with `log_custom_output_msg_set` then set the
log backend format set using `log_backend_format_set` with
`LOG_OUTPUT_CUSTOM`
Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Due to timeout settings, test was executing slowly and in certain
configurations it timed out. Adjusting timing to speed up the test.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit temporarily disables the `integration_platforms` for the
`log_user` test because it cannot be specified alongside the
`toolchain_exclude` filter.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit disables the `logging.add.log_user` test when building with
the Zephyr SDK because it fails for all emulate-able platforms at
run-time.
Revert this commit when the GitHub issue #49213, which tracks this bug,
is fixed.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
In order to avoid impacting test configuration and execution
disable default logging backends.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
CONFIG_MAIN_STACK_SIZE was increased for qemu_leon3, but after
15fdee04e3 logging: log_output: Add function for processing input arguments
this test started to fail on other platforms as well. Moving the stack
size override on the test wide prj.conf seems to make it work correctly
again.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Any project with Kconfig option CONFIG_LEGACY_INCLUDE_PATH set to n
couldn't be built because some files were missing zephyr/ prefix in
includes
Re-run the migrate_includes.py script to fix all legacy include paths
Signed-off-by: Tomislav Milkovic <milkovic@byte-lab.com>
This test keeps breaking whenever something in kernel or
architecture code changes. If we are to track footprint and stack, it
should be done in some other way.
The value of the test deminished if we have to change the boundaries
every second day.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add mock backend to support validating the output logs when
switching the log format at runtime. This removes the need to use
harness console when ztest framework is in use.
Fixes#47077
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
This test was merged before having re-run CI, and some logging API
changes had happened since CI was last run.
Adapt to those to fix the build.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add option to Kconfig to enable log_output module. It is used
by most of the backends but it is an optional formatter helper
thus it is possible to run logging without it. One example might
be dictionary based logging which does not format log message
to a readable string.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add stress test for logging to validate that logging is coherent:
All message are processed by the logger or dropped and no message
is lost.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Updated log_core to use spin lock instead of irq_lock.
Refactored z_log_msg_post_finalize function.
Update thresholds in the log_stack test.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add early returns from functions which are not used when
there is only one frontend in the system (no backends). This
allows to significantly reduce logging code size in that
configuration.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
We're not quite sure how much extra stack space picolibc will use, so
give it plenty of space for now.
Signed-off-by: Keith Packard <keithp@keithp.com>
Renaming objects which had 2 in the name to indicate that
it is v2 specific. Once logging v1 has been removed such
suffixes are redundant.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Tagged arguments feature fails to correctly tag a char array in
C++ configuration. Temporarily casting to char pointer to make
the test pass.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>