When using the LLEXT buffer loader we now avoid copying extensions
from storage to allocated memory by pointing directly into the stored
image. We then also perform linking and relocation in that memory,
which modifies its contents. However, this is impossible if that
storage is read-only. Add a Kconfig flag to distinguish between
writable and read-only storage types. Also use that flag to decide,
whether the extension image in test_llext_simple.c should be defined
as const or not.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extensions should be able to selectively export their global symbols.
Add a LL_EXTENSION_SYMBOL() macro for that. Change the present
.sym_tab to be a temporary symbol table of all global symbols in an
extensions, used only during linking for internal purposes. Add a new
.exp_tab symbol table to store symbols, exported by an extension
permanently.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extend the llext_load() / llext_unload() API to let it be called
repeatedly for the same extension to increment or decrement its
reference counter respectively. We use a mutex to protect the counter
and make both llext_load() and llext_unload() return the use-count to
let the caller identify when the first loading and the last unloading
took place.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some applications can decide to link their loadable objects for
exactly the same addresses, where they will be loaded. In those cases
local relocations aren't needed any more and can in fact break the
object if applied while the object is in a temporary storage. Add a
parameter to skip such local relocations.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The zbus_chan_read with K_NO_WAIT was generating a fail in the
qemu_riscv32_smp board. This fix replaces the K_NO_WAIT with a K_FOREVER
on the test, which would not affect the test execution for other
platforms/boards.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Before picolibc version 1.8.5, the only version of printf available with
long long output support was the version including full support for
floating point numbers and positional parameters. That version uses more
stack space than the limited version causing an overflow.
Increase the ztest stack space by 128 bytes.
Signed-off-by: Keith Packard <keithp@keithp.com>
Enable this test which runs in native_posix_64 in native_sim,
Switch from native_posix_64 to native_sim_64 as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable these test which run in native_posix in native_sim
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For all tests which were enabled for native_posix
enable them also for native_sim.
For those with native_posix as integration_platform,
set native_sim instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
* Simplify the test definition by using an EXTRA DTC overlay
so we don't need one test per board
* Move native_posix overlays to native_sim
* Switch the default integration platform to native_sim
from native_posix
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
For those with native_posix as default test platform,
which it to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable these test which run in native_posix in native_sim,
And set native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable these tests which run in native_posix also in native_sim,
And add native_sim as default test platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add fixture to test suite to allow for and signal that the test
must be run on real hardware.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
By making short inputs optional, the user can bypass short-events all
together if necessary (e.g. custom button-press listener).
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
Test expects that there are no other backends enabled and some
may be enabled by default.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim
And add native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable native_sim for this test.
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable native_sim for these tests (platform_allow filter)
Switch from native_posix to native_sim as default test platform
And switch overlays from native_posix to native_sim
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch from native_posix to native_sim as default test platform
Switch overlays from native_posix to native_sim.
And move overlays into a boards/ directory
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When using picolibc before 1.8.5, the only way to get 'long long' support
was to use the full version, including floating point support. This is too
large for this testcase.
Reduce the size of the printf code by switching to the version without
64-bit integer support. This allows the test to pass when using older
picolibc versions, such as that included with SDK version 0.16.3.
Signed-off-by: Keith Packard <keithp@keithp.com>
The UART backend test suite performs 9 iterations of:
1. Open UART backend pipe
2. Transmit 8192 bytes of pseudo random data
3. Receive and validate bytes
4. close UART backend pipe
The test is run on real hardware, with the TX/RX pins
connected to each other to provide loopback functionality.
The test suite has been run on a STM32 and an nRF5340 board.
The test suite tests both the UART interrupt driven and
async APIs.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
On xtensa architectures the string "ZEPHYR FATAL ERROR"
comes after the coredump itself. The ordered regex will
incorrectly fail for this arch.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
The test should work on any boards with UART console, so
increase the test coverage by adding `CONFIG_UART_CONSOLE`
filter and using `qemu_x86` as `integration_platforms` instead
of `platform_allow`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
On SoC series s32ze, Zephyr application cannot run with MPU
disabled, skipping relevant samples/tests
Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
The debug.coredump.backends.logging testcase did use 'console'
Twister harness whereas the test suite itself and the rest of
the testcases are implemented as Ztest. This misalignment
allowed to check basic output expected from the logging backend,
but caused inconsistency of the test suite results because
the 'console' Twister Harness can't use test cases' ID provided
by the 'Ztest' Twister Handler.
It is decided to focus the debug.coredump.backends.* suite
on the coredump backend API testing with Ztest.
The logging backend's resulting output should be tested
by its dedicated test suite debug.coredump.logging_backend
(tests/subsys/debug/coredump).
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Extend coredump_backend tests:
* fix COREDUMP_CMD_VERIFY_STORED_DUMP test was not executed.
* add tests for these coredump commands:
- COREDUMP_QUERY_GET_STORED_DUMP_SIZE,
- COREDUMP_CMD_INVALIDATE_STORED_DUMP,
- COREDUMP_CMD_ERASE_STORED_DUMP,
- COREDUMP_CMD_CLEAR_ERROR.
* extend the out-of-the-treee example 'empty' backend to
execute the new tests.
* fix the test's cmake project name.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Set the backend's context to its control block's context
instead of NULL when doing `log_backend_enable`, as the log
backend UART uses that later.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>