this fixes ruff linting error UP006,
where old typing types are still used
instead of newer, PEP585-compliant ones.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error E741,
where a variable name is ambiguous
or hard to read (e.g. l).
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM1101,
where a builtin, like any() or all()
has been reimplemented.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM114,
where there are multiple arms in an
if-elif-else construct with the same result.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM201,
where not is used instead of a more
appropriate comparison operator.
SIM202 exclusion was removed, as it
didn't apply to anything.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes ruff linting error SIM300,
where constant values are on the left
side of an expression.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes the ruff linting error SIM401,
where if-else construction is used instead
of dict.get().
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
This fixes errors E402 - module import
not at top of file.
One error in testplan.py left in,
as it is a part of a obscure 2020 fix
that would need to be re-tested.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
ruff check still detects a few linting errors
inside twisterlib.
We add them to the exclusion list to fix them
issue-by-issue in further commits.
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
The west packages extension can be used to install module dependencies.
Upstream nanopb has added the pip package dependencies to the
zephyr/module.yml file. Remove in-tree pip package dependencies.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a migration entry for the device driver API change, and start listing
driver classes that have been updated in-tree.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Move all adc driver api structs into an iterable section, this allows us
to verify if an api pointer is located in compatible linker section.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Tests the ADC clock domain on the stm32g0 serie
Possible ADC clock sources are SYStem clock (default) or PLL_P.
No clock source HSI for the ADC tested here.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Add uart-pipe driver default option in device trees for silabs boards.
It enables vcom for the boards, handy to have for sample application, for
example tester app.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Sleeping in sysworkq is a very bad idea, it can trash any hope of
realtimeness at best, deadlock the whole system at worse.
Add a check to input_report to downgrade the event to K_NO_WAIT
automatically when called from the sysworkq, similarly to what's done by
other APIs (netbuf and bluetooth), though only log if messages are
actually dropped.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This adds a test that checks that the Subnet Bridge behaves correctly
when one or more of the involved subnets are undergoing the Key Refresh
Procedure.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This introduces a global variable controlling the number of remote nodes
used in a given test case. This allows removal of the `TEST_TYPE_...`
enums and further tests in the future that can use different remote node
counts.
This also cleans up the test source by extracting common tester
initialization to separate functions, avoiding repetition.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Initializes the `net_idx` field of the ack context properly for KRP
functions in the Config Client.
This fixes a problem where `bt_mesh_cfg_cli_krp_get` and
`bt_mesh_cfg_cli_krp_set` would always fail the ack ctx comparison if
`key_net_idx` was != 0.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
This reverts commit ec0b9ccbc1.
This commit has two issues:
1. We already query signal poll just above, so, wastes time querying the
infor from the firmware.
2. Doesn't handle modes, i.e., queries even for AP mode as well.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the regex mode for zephyr-keep-sorted to verify alphabetical order
of projects.
Sort accordingly
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Release HSI CLK48 semaphore when going to sleep to allow C2 (M0)
core to start and stop clock as needed while C1 core is not running.
CLK48 is shared between RNG and USB. RNG is needed by M0 during BLE
advertisement. If semaphore is locked, C2 core can start it when it
needs to but not stop it.
Fixes zephyrproject-rtos#69955.
Signed-off-by: Jonny Gellhaar <jonny.gellhaar@prevas.se>
Ambiq USB HAL do not expect endpoint transaction request when an
endpoint is stalled. This commit addresses this behavior in shim driver
by checking for endpoint's stall status when enqueue request is
received, and defer it until endpoint stall is cleared.
Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
Apply nRF54H20 `min-residency-us` and `exit-latency-us` values for
existing power states.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Add 128 MHz clock source and use it for uart00. Baudrate setting
must be adjusted based on uart clock source so without this
change there is wrong baudrate on uart00.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The test interfaces registered addresses within the same subnet. As now
only the subnet part of the address is verified when choosing source
address or interface, it was not deterministic which interface would be
selected. Therefore, make the two interfaces use two different subnets
so that tests that verified which address/interface was used work
reliably as earlier.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When IPv4 address is added, currently the netmask remains empty. This
makes it impossible to use the address now that the netmask is
considered during address selection if the application does not
specify the netmask manually. Therefore specify a default netmask for
IPv4 addresses added to an interface with Kconfig.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Bit-wise comparing of the entire IPv4 addresses doesn't make much sense
as when selecting the source address for communication, what really
matters is the subnet part.
Doing so may actually lead to unexpected results, i. e. two addresses
within the same subnet should be considered equally good for
communication within the subnet, yet comparing the unique part of
the address (beyond the netmask) may lead to different results.
This is a problem for the mechanism of preferring the default interface
for LL communication if two interfaces have LL addresses with the
default subnet mask.
Fix this by filtering out the subnet from the IPv4 address before
passing it to net_if_ipv4_get_best_match() function.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case which validates that if two network interfaces are
equally good wrt net mask for LL IPv4 communication, the default
interface is preferred.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Currently we blindly return the LL address found on the default
interface or else on the first interface that has a valid LL address
configured.
This doesn't work well, if different interfaces have LL addresses
configured with a different subnet mask. Therefore, instead of blindly
selecting the address based on the first LL address encountered, use
net_if_ipv4_get_best_match() function for LL addresses to find the best
match for the given interface.
The rework takes into account current behavior, i. e. default interface
still gets the preference if there is no better candidate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test case verifying that a proper source IPv4 address and
interface is selected for a given LL destination address.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Accessing DWC2 otg core registers before the clock starts results in
complete system hang. Add a 1 us busy wait to make sure that software
won't access registers before the clock is started.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
The PSA Crypto implementation provided by Mbed TLS generally requires
some amount of heap to function, so enable the arena unconditionally
to make the test compatible with MINIMAL_LIBC configurations where the
arena is disabled by default.
Signed-off-by: Ilya Tagunov <Ilya.Tagunov@synopsys.com>
posix.common contains testsuites that can be separated into smaller
groups of tests. This change moves signal tests into a singular
testsuite at tests/posix/signals app directory.
Signed-off-by: Marvin Ouma <pancakesdeath@protonmail.com>
With recent changes the regulatory domain is handled via the hostap
rather than by passing and going through the driver and hostap doesn't
have any option for forcing the regulatory domain, so, add a note to
reflect that this is implementation dependent to cover both hostap as
well other offloaded implementations.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>