It is not possible to build anymore in that mode, so this filter
is not needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update option name s/CONFIG_ETH_NATIVE_POSIX/CONFIG_ETH_NATIVE_TAP/, which
follows recent Zephyr change.
Fixes 78f800642a ("drivers/ethernet/eth_native_posix: Rename to
eth_native_tap")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Fix amp to milliamp conversion where a 10^4 factor was applied instead
of 10^3.
Adjust existing test cases accordingly (including a small change to one
of the expected RMS values in pm.power_states that either changed
since the test was introduced or was set too aggressively back then).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
A segmentation fault occurs when a zero initialized struct with a string
field (JSON_TOK_STRING) is encoded. Encode a string null pointer as an
empty JSON string "".
Signed-off-by: Christoph Winklhofer <cj.winklhofer@gmail.com>
IUT works as an RFCOMM Client. The peer device, RFCOMM server, is a PC
running bumble.
Add following test cases:
Case 6, RFCOMM MTU Size Data Send/Receive Test. To verify that the RFCOMM
client can correctly send and receive data packets that are exactly equal
to the negotiated MTU size.
Case 7, RFCOMM Data Transfer Exceeding MTU Size Test. To verify that the
RFCOMM client can reject sending and receiving data packets that exceed
the negotiated MTU size.
Case 8, RFCOMM Disconnect and Reconnect Test. To verify that the RFCOMM
client can properly handle a normal RFCOMM disconnection and successfully
reestablish the connection.
Case 9, RFCOMM Recovery After ACL Disconnection Test. To verify that the
RFCOMM client can properly recover when the underlying ACL connection is
abruptly disconnected, by reestablishing both ACL and RFCOMM connections.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.
Add shell commands to create and manage L2CAP server and channel with
different security level.
In the test suite, there are 5 test cases. The test matrix combines
each bonding flag:
| Test Case ID | Initiator | Responder | Expected Result |
|--------------|-----------|-----------|-----------------|
| BR_SM_Bonding_INIT_001 | Non-bondable | Non-bondable | Pass |
| BR_SM_Bonding_INIT_005 | General Bonding | General Bonding | Pass |
| BR_SM_Bonding_RSP_010 | Non-bondable | Non-bondable | Pass |
| BR_SM_Bonding_RSP_011 | General Bonding | Non-bondable | Fail |
| BR_SM_Bonding_RSP_014 | General Bonding | General Bonding | Pass |
Signed-off-by: Can Wang <can.wang@nxp.com>
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.
Add shell commands to create and manage L2CAP server and channel with
different security level, reboot the board, and transfer data on the
SDP channel.
In the test suite, there are 28 test cases to verify SMP functions.
The test case list is:
- BR_SM_INIT_001: Basic Pairing with No Input No Output Capability
- BR_SM_INIT_002: Pairing with Display Only Capability
- BR_SM_INIT_003: Pairing with Keyboard Only Capability
- BR_SM_INIT_005: L2CAP Connection Failure After Successful Pairing
- BR_SM_INIT_006: L2CAP Server with Incoming Connection
- BR_SM_INIT_008: ACL Disconnection During Pairing
- BR_SM_INIT_011: Repeated Pairing Between Same Devices
- BR_SM_INIT_012: Security Level Escalation
- BR_SM_INIT_013: Multiple Channel Establishment
- BR_SM_INIT_017: Pairing Rejection by Remote Device
- BR_SM_INIT_018: Pairing Timeout
- BR_SM_INIT_021: Authentication Failure during Pairing
- BR_SM_INIT_022: Secure Connection vs. Legacy Pairing Fallback
- BR_SM_INIT_025: Rejection of Weak Pairing Methods
- BR_SM_INIT_028: Reconnection After Key Deletion
- BR_SM_INIT_029: Pairing with Delayed Response
- BR_SM_INIT_030: Stress Testing with Multiple Connect/Disconnect Cycles
- BR_SM_INIT_032: Power Loss Recovery
- BR_SM_INIT_034: Pairing During Active Data Transfer
- BR_SM_INIT_035: Pairing with Very Long PIN/Passkey
- BR_SM_INIT_037: Pairing with Peripheral Requesting Maximum Key Size
- BR_SM_INIT_039: Security Level Downgrade Attempt
- BR_SM_RSP_001: Basic Non-bondable Pairing with No Input No Output
- BR_SM_RSP_002: Display Only with Secure Connection
- BR_SM_RSP_003: Keyboard Only with Dedicated Bonding
- BR_SM_RSP_006: Security Level Enforcement
- BR_SM_RSP_008: L2CAP Connection with Security Level 1
- BR_SM_RSP_009: L2CAP Server with Security Level 2
Signed-off-by: Can Wang <can.wang@nxp.com>
IUT works as an SM Initiator/Responder. The peer device,
SM Responder/Initiator, is a PC running bumble on it.
Add shell commands to create and manage L2CAP server and channel with
different security level.
In the test suite, there are 10 test cases. IUT is configured
with Secure Connections Only Mode. The peer device is configured with
Secure Connections Mode or Legacy Mode. The test matrix is:
| Case ID | Secure Connection Option | Security Level | Expected Result |
|---------|--------------------------|----------------|-----------------|
| BR_SM_SC_INIT_005 | SC Only with SC | Level 4 | Pass |
| BR_SM_SC_INIT_006 | SC Only with SC | Level 1 | Fail |
| BR_SM_SC_INIT_007 | SC Only with SC | Level 2 | Fail |
| BR_SM_SC_INIT_008 | SC Only with SC | Level 3 | Fail |
| BR_SM_SC_INIT_009 | SC Only with Legacy | Level 3 | Fail |
| BR_SM_SC_RSP_005 | SC Only with SC | Level 1 | Fail |
| BR_SM_SC_RSP_006 | SC Only with SC | Level 2 | Fail |
| BR_SM_SC_RSP_007 | SC Only with SC | Level 3 | Fail |
| BR_SM_SC_RSP_008 | SC Only with SC | Level 4 | Pass |
| BR_SM_SC_RSP_009 | SC Only with Legacy | Level 3 | Fail |
Signed-off-by: Can Wang <can.wang@nxp.com>
IUT works as an RFCOMM Server. The peer device, RFCOMM Client, is a PC
running bumble on it.
Add shell commands to create and manage RFCOMM server with different
flow control mechanisms.
In the test suite, there are seven test cases:
Case 1: RFCOMM Server - Reject RFCOMM Session. IUT should properly
reject incoming RFCOMM session when BR connection is disconnected.
Case 2: RFCOMM Server - Forward compatible with Bluetooth devices that
do not send PN command. IUT should properly handle this case and use
FCON/FCOFF as flow control.
RPN, Test) and send NSC responses
Case 3: RFCOMM Server - Respond to Control Commands After DLC
Establishment. IUT should properly respond to control commands (RLS,
RPN, Test) and send NSC responses.
Case 4: RFCOMM Server - Information Transfer with Aggregate Flow
Control. IUT should handle information transfer with aggregate flow
control and properly issue flow control signals.
Case 5: RFCOMM Server - Information Transfer with Credit Based Flow
Control and Active Disconnection. IUT should handle credit-based flow
control and actively disconnect DLC.
Case 6: RFCOMM Server - Information Transfer with Credit Based Flow
Control and Passive Disconnection. IUT should handle credit-based flow
control and respond to DLC disconnection.
Signed-off-by: Jiawei Yang <jiawei.yang_1@nxp.com>
The tests was written wrong. It was meant to test using same spi bufs
for both rx and tx, as in tree many sensor and other spi device drivers
use this paradigm. But the 2nd buf setup call was overwriting the first.
Fix by not using the helper function for this case.
And for the write back test, test using same spi_buf_set.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Remove the unused variable 'lock_id' from main.c in the arc_vpx_lock test.
No functional change intended.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Based on a discussion around P4WQ limitations for our application, it
was determined that the RTIO workqueue required the ability to use
additional threads from the pool in spite of work items blocked.
Since this is not covered, nor desired for the P4WQ, then remove this
dependency and re-implement it in a way that covers also this use-case.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Processed on separate worker threads. This test is expected to fail
as the P4WQ limits the number of active items assigned to worker
threads to the number of CPU cores the system has.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Attempting this would fail (assuming the controller is implemented
correctly) because when using legacy commands it is not allowed to
change the device address while scanning.
It also did not make sense. If we have configured the scanner to use
the identity address as own_addr, because the advertiser and scanner
addresses are shared when using legacy commands, setting the adv NRPA
here would overwrite the identity address used by the scanner, which
I assume is not the intention.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
In 25c993e5b7 a new case was introduced
where own_addr_type is not set by bt_id_set_scan_own_addr properly.
This led to issues for users where increasing their zephyr version
led to failures to start scanning after advertising in the case where
CONFIG_BT_SCAN_WITH_IDENTITY=n and legacy advertising commands are used.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
These two (sub)tests assume the system tick period divides evenly all
time interval values being tested, but this is not the case in general,
and when it is not, these tests fail.
Let's skip these 2 tests by now so we can release without a broken
CI, and do not block other development while the tests themselves are
being fixed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The #91219 miss some entries when doing the clean-up. This removes
some of remaining SUBALIGN entries in the iterable sections. It do
not consider SECTION_PROLOGUE and zephyr_linker_section entries.
Fixes#92349
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
In check_dns_query(), the assignment `ret = -ENOMEM` was never used since
the function returns false immediately afterward.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The name used in CMakeLists for this test is "zero_latency_irqs" despite
testing the ramfunc feature instead. This might be a copy-paste mistake
as it was originally "arm_zero_latency_irqs", which is another test that
exists.
Change the project name in CMakeLists to match what the test truly is.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
`DEVICE_DT_GET()` guarantees that the `dev` pointer can never
be `NULL`, the check is therefore redundant, remove it.
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Missed in #91596 that more platforms are added in common part.
Excluded nrf9160dk/nrf9160 and nucleo_wba55cg from
configuration with BLE.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Update the process_dns function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Update the trigger_events function signature to match the expected
k_thread_entry_t type:
typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Fix a bug in zbus_chan_rm_obs() where removing the first observer in a
channel's observer list would cause undefined behavior due to accessing
a member of a NULL pointer.
The issue occurred when prev_obs_nd was NULL (indicating the first node
in the list) and the code attempted to pass &prev_obs_nd->node to
sys_slist_remove(). This resulted in accessing the 'node' member of a
NULL pointer, which is undefined behavior even when taking its address.
The sys_slist_remove() function is designed to handle a NULL prev_node
parameter correctly for removing the first element in a list. The fix
ensures we pass NULL directly instead of attempting to compute the
address of a member within a NULL pointer.
This was detected by Undefined Behavior Sanitizer as "member access
within null pointer".
Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
Socket dispatcher (and offloaded implementations in tests) register
fd as ZVFS_MODE_IFSOCK therefore they should register a close2(
function instead of close().
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The iface test suite uses two different interface types with two
different context types and iid tests mixed up the two. It attempted
to create a mac address for Ethernet interface (which uses
struct eth_fake_context), however the net_iface_get_mac() function
only works with Dummy interface context (struct net_if_test). In
result the Ethernet interface context was corrupted (mac address
overwritten the promisc_mode flag).
Fix this by extracting mac generation code into a common function, and
use it in the Ethernet iface initialization phase instead of directly in
the test.
This was reported by UBSAN:
tests/net/iface/src/main.c:239:34: runtime error: load of value 11,
which is not a valid value for type '_Bool'
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
According to RFC 793, ch 3.9 Event Processing,
after the connection is sync-ed with seqnum of both sides then,
1. drop any received segment if the ACK bit is off.
2. validate the acknum like this:
SND.UNA =< SEG.ACK =< SND.NXT
The ACK validation is done before entering the state-machine, so
remove the flags <ACK> check in the state-machine processing.
Signed-off-by: Shrek Wang <inet_eman@outlook.com>
These tests can be run equally on native_sim//64.
Let's also allow them in it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For native_sim[//64], these tests need to be built with
CONFIG_SDL_DISPLAY_USE_HARDWARE_ACCELERATOR=n
Until now we defined this option in the yaml file for each test
targetting the sdl display driver.
But if somebody builds the test directly, it will fail as these yaml
kconfig defined options would not be used.
Let's instead define it in a board overlay, so in that case the test
will also work.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add early_disconnect test cases for iso/cis and l2cap/stress
to test the bluetooth stack handling of disconnects
while transmit is still in progress.
Signed-off-by: Mike J. Chen <mjchen@google.com>
IRQ 1 is used by the LiteX timer, so we can't use it for the test:
gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)
Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Refactored the code to use the standard struct in_addr for
representing IPv4 addresses instead of a uint32_t combined
with the custom IP_ADDR macro.
Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
Include all supported Espressif SoC variants in the MCUboot
test suite to ensure proper CI coverage.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This early exit section is only reached if there is an error.
In the case of not supported, the ret variable will be 0 and zassert
won't happen. This is because the test was meant to be skipped, not
passed or failed, in this case. So add the skip call.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Add a common function, start_broadcast_adv, to start
broadcast advertisement in the LE Audio BSIM tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>