In order to have clean, self-contained HCI headers that do not have any
dependencies towards the Host or any other part of the system (except
types), reorganize the headers in the following way:
- Split out the macros and structs from hci.h to a new hci_types.h
- Merge the existing hci_err.h into the new hci_types.h
Fixes#58214.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Typically the client is the first device in our babblesim tests, so
reordered the initiator and acceptor for the CAP tests to conform to
that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add test of the unicast audio cancel that can cancel any pending
procedures. This is done by adding a new blocking behavior in the
cap acceptor.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Previously pthread_barrier_t was implemented in terms of wait
queues and internal scheduler functions.
This introduced some obstacles and inconsistency. In order
to be more consistent, rely only on Zephyr's public API and
reuse as many concepts as possible.
Deprecate `PTHREAD_BARRIER_DEFINE()` since it's non-standard.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Split the cap_initiator_test.c to two new files
cap_initiator_broadcast_test.c and
cap_initiator_unicast_test.c as the two barely had any
common functionality, and the file was getting too large.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change the pinout for ADC/DAC loopback testing on the stm32 boards
nucleo_l073rz: adc_in0_pa0/dac_out1_pa4 --> A0 to A2 on arduino CN8
nucleo_g071rb: adc1_in0_pa0/dac1_out1_pa4 --> A0 to A2 on arduino CN8
stm32l562e_dk: adc1_in13_pc4/dac1_out1_pa4 --> A2 to A4 on arduino CN19
Adjust the ACQuisition time to the MAX value because the default (=0)
is too low for several boards.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
ATT attributes can be up to 512 bytes long, so the comparisong needed
fixing.
See spec v5.4, Vol 3, Part F, 3.2.9.
Fixes#57930.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add the '.buffered' field to the dac_channel_cfg structure
when testing the DAC.
This boolean parameter is initialised to 'true' to PASS the test.
It follows the https://github.com/zephyrproject-rtos/zephyr/pull/57730
Also changed for the samples/drivers/dac
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change the test_set_timing_data_while_started test to actually attempt to
set the data phase timing parameters instead of attempting to set the
nominal/arbitration timing parameters.
Update test descriptions to explicitly mention data phase timing.
Fixes: #59046
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix BIS test for ISO Tx Buffers in Controller to be 2 for
ISO TX MTU size of 502 bytes.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce a Kconfig BT_CTLR_ISOAL_SN_STRICT to relax the Tx
ISO Data SDUs being dropped due to strict check of sequence
numbers in ISOAL, i.e. dropped when ISO Data SDUs are
delayed from upper layer with respect to the current
payload number in the ISO radio events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Check that if a bonded peer subscribed to a CCC, a non-bonded peer with
the same address cannot update the CCC.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from tests. It has
been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183
The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The SW div implementation from libgcc doesn't handle division by
zero case, so the HW exception isn't triggered.
So, skip this test case (as we are already doing for some other
ARC targets).
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
-- Updated test cases to include missing / lost SDUs.
-- Included tests for receiving only framed padding PDUs.
-- Removed tests linked to sink and source configuration params as these
were unused and removed.
Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
Testing:
-- Receiving only padding PDUs for an SDU
-- Receiving leading padding PDUs (not an expected use case)
Signed-off-by: Nirosharn Amarasinghe <niag@demant.com>
Do not run benchmarks on some special qemu platforms. Those were
previously ignored, but due to tag changes, they started running again.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Testing NMI on emulated QEMU platforms brings some interesting and wrong
results like:
START - test_arm_runtime_nmi
Trigger NMI in 10s: 0 s
Trigger NMI in 10s: 1 s
Trigger NMI in 10s: 2 s
Trigger NMI in 10s: 3 s
Trigger NMI in 10s: 4 s
Trigger NMI in 10s: 5 s
Trigger NMI in 10s: 6 s
Trigger NMI in 10s: 7 s
Trigger NMI in 10s: 8 s
Trigger NMI in 10s: 9 s
NMI triggered (test_handler_isr)!
Assertion failed at ... arm_runtime_nmi_fn_test_arm_runtime_nmi:
(nmi_triggered is false)
Isr not triggered!
where the NMI handler is correctly called, see `NMI triggered`, but the
assert still fails on `nmi_triggered` being false.
This is due to a limitation in the emulation but also in the test not
being strictly architecturally compliant (you need a DSB;ISB sequence
after writing to SCB).
Add the proper barriers after writing to `SCB->ISCR` to make it
compliant and making it pass on QEMU as well.
Also reduce the timing to 2 sec.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Recently, a race condition was discovered in `pthread_create()`
and `pthread_join()` that would trigger an assertion in
`kernel/sched.c` of the form below.
```
aborted _current back from dead
```
This was mainly observed in Qemu. Unfortunately, Qemu SMP
platforms exhibit a real and measurable "scheduler noise"
which makes testing rather difficult.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The `aborted _current back from dead` error may appear in this
particular test under Qemu (and in particular Qemu SMP) systems.
A small delay between `pthread_create()` and `pthread_join()`
is sufficient to mitigate the issue.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Update `ccc_store` bsim test to remove the 'expected failure'. The issue
being fixed in the following commit.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
RT1015 needs more RAM to do this test, increase size of Zephyr SRAM
by switching zephyr,sram to the OCRAM allocation of the FLEXRAM.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Increase hardware sampling interval to 30ms for MCUX ADC16. The ADC
callback in the repeated_samplings test takes roughly 27ms to execute,
so a sampling frequency of this interval still allows the ADC test to
verify the ADC is being sampled at a given interval, while avoiding the
pitfalls that result from a kernel timer shorter than the duration the
ADC callback takes to run.
Fixes#58467
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This test simply counts how many times `eventfd_read()`
and `eventfd_write()` can be called on an
`eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK)` file
descriptor.
Prior to the recent changes in `eventfd`, we were seeing
approximately < 1000 writes / s. However, the previous
`eventfd` implementation would fail this test with the
result that the number of successful reads was far greater
than the number of successful writes.
This should be impossible, and with the recent `eventfd`
changes that was fixed. Additionally, we are seeing an
increase in over 40x for non-blocking eventfd reads and
writes.
```
START - test_stress
I: BOARD: qemu_riscv64_smp
I: TEST_DURATION_S: 5
I: UPDATE_INTERVAL_S: 1
I: avg: 48537 reads/s
I: avg: 48575 writes/s
PASS - test_stress in 5.002 seconds
```
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Previously, the prototypical use case for `eventfd()` was not
possible in Zephyr due to a deadlock associated with the
`fdtable.c` `k_mutex`.
The prototypical use case for `eventfd()` is to make a
blocking call to `eventfd_read()` from one thread, and then
from another thread, call `eventfd_write()` to "wake up" the
reading thread.
This additional test case ensures that Zephyr supports the
prototypical `eventfd()` use case.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The kernel/context test_timer_interrupts() test has a loop calibration
phase to estimate the number of loops needed for 1 system tick.
By initializing this calibration to 1 instead of 0, we can avoid an
edge condition where the calibration phase indicates 0 loops are
required (a case that could happen when running on a slow simulator).
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
All those benchmarks are kernel related, so add the kernel tag to avoid
building them when non kernel changes are being submitted.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Kernel is being built the same way for all those tests and there is not
much related to the linker generator in any of those tests. Just keep a
small set of tests to have needed coverage in the kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
RT685 and RT494 ran out of mpu regions to do this test,
so add board overlays to disable the USB SRAM MPU
region definition because it is not needed for this test.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
mem_protect and sprintf stacks both need to be slightly larger than
currently defined in order to avoid stack overflow when using picolibc.
Signed-off-by: Keith Packard <keithp@keithp.com>
Each SoC may have different limitation regarding DMA buffer size.
This commit places the test transfer size in Kconfig so it can
be modified accordingly.
Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
The first test check that if a bonded peer subscribe to a CCC, this
change is correctly stored to flash.
The second test, which is currently failing, is included to reproduce a
bug that occur when CCC or CF store on write is disabled and the other
one is enabled, leading to the delayed store being enabled. Causing the
value of the corresponding `n` selected option to not be stored at all.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Modify the test to not rely on assumption that RX buffer is released
when it is fully released. RX buffer maybe released after any RX_RDY
event within the buffer, e.g. after each timeout driver may be
switching to the new buffer.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add iterations to test_cap_initiator_unicast so that
we test starting again after stopping, as well as recreating
the group.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Mocks used in the test were not initializing certain variables.
Valgrind detected that. Test was passing but could fail if some
garbage would end up in that memory.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>