Commit 7e8ee25479 moved the tests for the
POSIX_RW_LOCKS Option Group from the tests/posix/common testsuite to
its own dedicated testsuite.
However, there was a copy-paste error. Previously, tests would have been
run only once when dynamic threads were enabled, and then skipped when
dynamic threads were disabled, since that follows the posix programming
model better. However, dynamic threads were never actually enabled after
moving to the new testsuite. So all tests were effectively skipped.
Add the necessary options to prj.conf in order to ensure that there are
sufficient dynamic threads available to run the testsuite.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Implement the video control framework with the following features:
- Drivers initialize the control with a valid value range at boot which
guides the application developer and the framework. Hence, the video
framework could do all common works for drivers e.g., sanity check.
- Controls need to be cached to memory. Video framework handles
get_ctrl(), drivers don't need to implement this API. It is because
reading control value directly from registers are not only inefficient
but also sometimes impossible, e.g. controls that scatter through
several registers. Only "volatile" control needs to be updated at
runtime.
- Only the devices (e.g., sensors) owning the controls need to
implement set_ctrl(). Other devices of the pipeline do not need to
propagate set_ctrl() and hence, do not need to implement this API
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
- Remove duplicated conf/.overlay configuration for
mimmxrt1170_evk A and B revisions that have the same content.
- No change if .conf/.overlay have different content.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
The nullpointer address (0x0) is mapped to the debug module in cva6,
making it a valid address.
Thus, in the coredump test, trigger an exception using k_panic()
instead.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Extend timeout on k_mem_slab_alloc() for kernel.memory_slabs
memory_slab_1cpu.mslab test suite as a workaround to allow its run
on slow platforms, e.g. simulated intel_ish_5_8_0.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This commit fixes all includes in testlib according to IWYU rules and
sorts all includes in ascending order by name.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Use power state pointers instead of copies which improves performance.
Align power_mgmt_multicore test which was creating pm states in
runtime.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Bluetooth had two public types with similar name _bt_gatt_ccc and
bt_gatt_ccc, but for absolutely different purposes.
That caused misunderstanding of relationship of them and cases
where to use which one.
Commit changes name of _bt_gatt_ccc to more suitable by usage and
improves documentation of it.
Additionally, it changes name of BT_GATT_CCC_INITIALIZER
to correspond the type name.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Add more tests cases to the AF_PACKET sockets test suite, covering the
summary of the packet socket functionalities prepared from various
sources (mostly man pages).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The test case did not do what it said, it was supposed to receive data
on both RAW and DGRAM packet sockets, but instead it received on RAW
socket twice.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Test interface configuration doesn't change throught the test suite
execution, therefore there's no need to reiterate the interfaces to set
the interface pointers in each test case. Do it just once, when test
suite is setup.
Also remove the __test_packet_sockets() function which seemed no longer
useful with all those simplifications.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Packet socket tests used non-blocking sockets so in results the test
code was overly complicated with delays and loops scattered all across
the test code, making it difficult to read.
As packet sockets do support blocking operation with timeout,
reconfigure the sockets to use that and simplify the test code by
getting rid of unnecessary loops and delays.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Test suite prints a warning on boot about not enough IPv4 context
instances compared to the number of interfaces, therefore adjust the
config value to get rid of it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Make sure all sockets used in test are closed even in case of test
failure. Otherwise, a single test failure could derail other tests,
making the results obfuscated.
Remove redundant code related to socket creation.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
I3C can contain a lot of features that may be unused. Add Kconfigs for
enabling controller and/or target code. Choosing just one can reduce
the code size footprint.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Check the order of constructors, making sure those with a specified
priority are called in numeric order after which those without priority are
called.
Signed-off-by: Keith Packard <keithp@keithp.com>
Remove the source of non-determinism during emulation
by keeping terminal events reproducible between runs.
By using the mechanism of precise pause in Renode emulator
every interaction with terminal happens at the same virtual time
from the perspective of an emulated system, hence makes it independent
of the host. Otherwise the result of a test is susceptible to
the load on the host and robot process keywords' timing.
Renode emulator supports precise pausing when specified sequence of
characters is received on a terminal. Besides that,
char delay parameter is specified to set time interval between
consecutive characters entered in the terminal.
'Start Emulation' keyword is redundant, because 'Wait For'
keywords automatically continue emulation up to the nearest pause
event (e.g. matched pattern on the terminal).
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Removed boards that are not exercised in the CI pipeline, as they are
highly downstream-specific and not relevant to upstream validation.
Signed-off-by: Dipak Shetty <shetty.dipak@gmx.com>
For the SAI peripheral, the MCLK signal input/output direction is
independent from the TX or RX bit clocks directions (TCR2[BCD] and
RCR2[BCD]). Introduces mclk-output property.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
I just happened to try to run this testsuite manually today and
noticed that it was being skipped due to a copy-paste error.
This test was migrated from tests/posix/common, where tests
were skipped for non-dynamic threads, since it would mostly
duplicate tests that had already been run.
However, while migrating, the condition to skip tests was
mistakenly left in when it should not have been.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
timer_create() will error if there are no dynamic threads to
run the SIGEV_THREAD handler, causing the test to fail (where
it was previously expected to pass).
Ensure that there is at least 1 dynamic thread available to
the POSIX API.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add return value to z_add_timeout. It returns system tick when timeout
will expire.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The ADC and watchdog samples are not currently supported for the
non secure target of the nRF54L10 DK.
Add exclusions for these until they are supported.
Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
As it is a common pattern for drivers performing writes (e.g: write
reg-addr + write reg-data) without having to memcpy both into a buffer.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Add test cases where spi_transceive gets NULL spi_buf_set
once for tx and once for rx.
Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
Remove the dependency on the system heap existing when enabling
`ZBUS_RUNTIME_OBSERVERS`. Instead the previously allocated memory is
required to be provided to `zbus_chan_add_obs` (which can still be
allocated through malloc).
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update `bt_irk_eq` to use `util_memeq` instead of `memcmp` and the
"disconnect" BabbleSim test to use `util_eq` instead of a first
assertion on the size followed by a `memcmp`.
This is done as an example usage of the two new functions.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
This adds the best HD=4 CRC32 polynomial. The discovery
is the result of research by Philip Koopman of Carnegie
Mellon University, and is well documented at
https://users.ece.cmu.edu/~koopman/crc/.
The user is given the option of trading 1024B of RAM to
improve the execution speed. The unit tests are parameterized
with this KConfig option.
Signed-off-by: JP Hutchins <jp@intercreate.io>
Previously, these tests were part of tests/posix/common.
In an effort to tie feature tests to specific POSIX features
(Option Groups), these tests were moved to a separate suite in a
previous commit.
However, the memory requirements for the legacy
tests/posix/common testsuite were significantly higher while the
memory requirements for tests in tests/posix/c_lib_ext are
significantly lower.
Remove the minimum flash and ram requirements to run the test so
that it passes tests on the integration platform qemu_cortex_m0.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add simple helper macro so users can define a CCCD with a write cb
without having to combine BT_GATT_CCC_MANAGED() and
BT_GATT_CCC_INITIALIZER() themselves.
Unlike the changed callback the write callback has a return value
that can be used to reject the write request.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>