When building an LLEXT-enabled kernel, 62b19ef65c added weak aliases
of all syscall implementation functions to a pointer to NULL, with the
assumption that LLEXT would check the required symbols at link time and
fail if any of them were found.
This check, however, is ineffective in the current implementation: the
actual address that is exported is the rather normal-looking location of
the variable containing the NULL pointer. This defeats the NULL symbol
validity checks in llext_link.c and causes the extension to crash at
runtime by jumping to a location containing a few zeroes in read-only
data memory.
This commit makes sure the alias target is actually placed at address 0
using the llext-sections.ld linker fragment, so that undefined syscall
implementations are exported as NULLs and as such properly flagged at
link time.
The test for this functionality is also updated to reflect the change.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Full name or description of a board is something we are missing in
HWVv2. It is right now being added to yaml files parsed by twister. This
should be generically available to tooling and documentation
independently from twister.
As we rework how twister parses board meta-data (#77250) and how we
generate board documentation (#79160), this becomes neceassry.
Moving the board full name/description from the twister yaml files to
the board.yaml is something we can automate once the schema is agreed
upon.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Like some other string properties, I will add a derived form
to FULL_NAME to make it easier to reference from macros.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This is required if boards make use of such definition in their Kconfig
files. In Kconfig.board.v2, only `boards/Kconfig.v2` is loaded, but
BOARD_REVISION is part of `boards/Kconfig`, which can't be loaded in this
context.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Fixed escaping of double quotes, backslashes, and new line characters
so they can be used in string properties.
Previously, double quotes and backslashes were escaped in gen_defines.py
but not in gen_dts_cmake.py, and new lines were not escaped in either,
so using any of these characters would break the build.
Signed-off-by: Joel Spadin <joelspadin@gmail.com>
Add unsigned integer support to the log parser.
This does not change the underlying log format,
it only allows the log parser to more accurately
read the log format.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Fix trailing `\\r\\n` (escaped CR/LF) didn't cut off because of rstrip()
removed by #58338, so the CR/LF suffix was never found as the actual line
end was `\\r\\n\n`.
Add ANSI code sequence to `test_handlers` Twister unit test.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Add several examples for `upload_test_results_es.py` script usage
with ElasticSearch index map files for the following use cases:
* Twister test results.
* Twister test results with recordings.
* Memory Footprint data (`twister-footprint.json`).
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Separate the pickled EDT generation from the C-Macro header
generation in gen_defines.py to have a more clear responsibility
of the scripts in the DTS parsing process.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Introduces type hints to all functions for improved static type checking
and IDE support.
Also equalizes spacing between functions as the lines are being touched
anyway.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit adds support to dictionary logging to parse binary
data directly from input serial and generate the ascii logs.
Signed-off-by: Kumar Siddaramayya <harish.kumar@nordicsemi.no>
native_posix is now deprecated.
Building this sample in both native_sim and native_posix does not
improve coverage for the sample or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for this sample.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Adds a --download-buffer-size option to the canopen runner to allow
specifying the buffer size of the SDO download.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Package in the requirements-run-test.txt file, bz,
is not package enabling bz2 support.
It is a security concern and must be removed.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Currently, debug logging in the console and verbosity
are tightly coupled - verbosity of level 2 and higher
enables logging at the debug level.
This change introduces a separate Twister flag
responsible for controlling the debug logging,
while leaving the rest of verbosity unchanged.
This allows for controlling the verbosity on
both logging levels, according to one's needs.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
In case of problem with parsing hex data from coverage dump,
do not create empty gcda file.
Such empty file will break gcovr parsing.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Added new Kconfigs for defining permission level of GATT
characteristics that are part of the Bluetooth SMP service in the
MCUmgr subsys.
Removed the CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN as the new Kconfig
options are mutually exclusive and need to be groupa as the Kconfig
choice option.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Add new script `pack_as_twister.py` to convert memory footprint
data prepared by `./footprint/scripts/track.py` into JSON files
compatible with Twister report schema. Next, the data can be
transformed and uploaded to ElasticSearch data storage the same
way as memory footprint (and other) reports executed by Twister.
Add to `plan.txt` an optional column with the corresponding
test suite names for 'footprints' as an example for test instance
name composing with `--test-name` command argumnent.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This small change concerns the following filter functions:
1. `dt_compat_enabled(C)`:
There's a node with compatible `C` and status "okay".
2. `dt_enabled_alias_with_parent_compat(A, C)`:
There's a node with alias `A` and status "okay", and its parent
has compatible `C`.
3. `dt_label_with_parent_compat_enabled(L, C)`:
There's a node with label `L`, and its parent has compatible `C`
and status "okay".
All three functions involve checking whether some node or its parent has
a given compatible, but the way this has been checked is inconsistent.
Function (1) has done it with this Python conditional:
compat in node.compats
while (2) and (3) have used:
parent.matching_compat == compat
The first check works well with nodes that have multiple compatibles,
and it is more aligned with the notion of "has_compat" as seen in the
devicetree macros for C, CMake, and Kconfig.
Arguably, `matching_compat` shouldn't have been used here, because it is
actually a property of a node's binding, moreso than of the node itself.
In practice, it's usually equal to the first compatible for which edtlib
has found a binding, which at first glance is just more constrained than
the `node.compats` check. However, there also exist obscure cases where
the `node.compats` are empty, while the `node.matching_compat` is not.
For now, the three functions can use a combined check, to improve
consistency and utility while avoiding breakage:
node.matching_compat == compat or compat in node.compats
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
It has been deprecated since Zephyr v2.6.0.
The filter that replaced it - `dt_enabled_alias_with_parent_compat` -
had shared code with it, which can now be inlined into `ast_expr()` to
match the parser's overall code structure.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The script was only looking at the Zephyr base repository and failing to
look for soc roots e.g. in other modules.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
With the requirement in #78316 for Zephyr modules to always define
ZEPHYR_<name>_MODULE Kconfig setting then there is no longer a need
for this commit. Simplify check_compliance by reverting ths commit.
This reverts commit 35e28e6315.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When at verbosity 1, we print out the status of TestInstances.
This makes it harder to notice changes at TestCase level,
which require perusing the logs.
This adds TestCase status and reason printing
if verbosity level is 2 or more.
Reason printing is suppressed if the reason is empty or None.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Running sysbuilt tests fails because of missing "run" target.
This adds the default domain context to the command.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Some dict.get() calls did not use a TwisterStatus
as a default value, thus using a NoneType where
TwisterStatus should appear.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
ReStructuredText can sometimes be tricky to get right, especially for
folks that might be more familiar with Markdown.
This adds a Sphinx/RST linter to the compliance check script to help
catch common issues that can easily go unnoticed and cause rendering
issues.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Fixes bad usage of single backticks in lieu of double backticks for
rendering inline literals, or simple '*' for italics.
When appropriate, a better construct than double backticks has been
selected (ex. :file:, :kconfig:option:, :c:func:, ...), or proper :ref:
have been used if the original intention was to have a link.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
If you interrupt process() operation, we want Twister
to exit as gracefully as it can. This avoids the
UnboundLocalError that could appear e.g.
when interrupting the operation via SIGINT.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
"type | None" syntax is only available with Python from version 3.10,
fix building with earlier 3.x Python versions.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Align with native_simulator's upstream main
b4b9791ac822ae300363dc3ebbc7b7ac200632ce
Which includes:
* b4b9791 NATIVE_SIMULATOR_IF macros: Provide version with explicit
section names
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This changes how some arguments are set in the `Handler`s.
`options`, `generator_cmd` and `suite_name_check` are now passed as
arguments to the constructor rather than injected from an other module.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>