Commit graph

10 commits

Author SHA1 Message Date
Ederson de Souza
3bbe42f789 tests/subsys/tracing: Async tracing API test fix
Test `tracing.transport.uart.async.test` was working only due sheer
serendipity: one of the tracing strings checked,
sys_trace_k_mutex_lock_exit, was never being registered on the tracing
buffer. However, the check never got to check this string, so the test
was passing.

Why wasn't it being registered? Tracing buffer size was a bit small for the
flurry of messages - increasing it solves the problem, and is what this
patch does.

Why did the check never got to the missing string? Tracing thread has a
lower priority, so when the k_sleep of test thread expired, it was
preempted. Indeed, if the sleep was changed by any number of ticks, the
test would fail. Even changing order - and thus number - of instructions
executed could make this test fail.

While at it, fixed some typos and an imprecise commentary on code.

Fixes: #84169

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-01-23 00:13:46 +01:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Anas Nashif
345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Meng xianglin
50faa2d79c tests: tracing_api: move to new ztest API
All test cases in tests/subsys/tracing/tracing_api/ are moved to
new ztest API.

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2022-09-08 10:39:10 +02:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
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>
2022-09-05 16:31:47 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
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>
2022-08-02 16:41:41 +01:00
Kumar Gala
dcfcd05ed3 tracing: Move to DTS for uart device
Move from using Kconfig TRACING_BACKEND_UART_NAME to a devicetree
chosen property ("zephyr,tracing-uart").  This is similar to a number
of other functions like "zephyr,shell-uart" or "zephyr,bt-uart".

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-19 16:00:47 -07:00
Gerard Marull-Paretas
ade7ccb918 tests: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:02:14 +02:00
Nazar Kazakov
f483b1bc4c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-18 13:24:08 -04:00
NingX Zhao
5591357217 tests: subsys: Adding testcases to check trace API
Add some testcases to verify tracing's APIs,
check output data by using uart backend of self-design.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
2021-09-05 07:25:34 -04:00