Commit graph

16700 commits

Author SHA1 Message Date
Seppo Takalo
1506a43705 tests: lwm2m: Enable DTLS CID for interoperability tests
Leshan Demo server seem to support it so it makes sense to
use it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-07 09:47:00 +01:00
Seppo Takalo
0a104185fe tests: lwm2m: Add Qemu X86 and fix Qemu Cortex-M3
* Add support for running interoperability tests with
  Qemu X86.
* Remove some debugging messages to allow binary to
  fix Qemu Cortex-M3 board.
* Tune buffer and stack sizes to fit all boards.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-11-07 09:47:00 +01:00
Keith Packard
6d38ecae1d tests/c_lib: Test picolibc module configurations
Make sure the picolibc module builds and runs in both TLS
and non-TLS variants.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-11-07 09:42:19 +01:00
Daniel DeGrasse
6a31ed50b8 tests: add test for SDIO subsystem
Add test to verify SDIO subsystem. Note that due to the nature of SDIO
cards, this test only reads from common registers and does not verify
extended reads or writes.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 19:01:08 -05:00
Daniel DeGrasse
0fc49b6290 tests: drivers: sdhc: add test for card insertion interrupt
Add test for card insertion interrupt to SDHC test.

The test will now wait for the card insertion interrupt whenever it is
run without a card in the slot. By inserting a card, the user can verify
that card insertion interrupts work correctly, as this should notify the
test and allow it to proceed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 19:01:08 -05:00
Evgeniy Paltsev
c5cd886518 test: spinlock: cleanup assertion
Don't double check on assertion condition.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-11-06 15:44:34 -06:00
Huifeng Zhang
0be647ccaa boards: fvp_baser_aemv8r_aarch32: Add fvp_baser_aemv8r_aarch32_smp board
This commit add a new board named 'fvp_baser_aemv8r_aarch32_smp'

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-11-06 15:32:01 -06:00
Alberto Escolar Piedras
b3447ec068 tests bsim: Add simple tests for broadcast audio source/sink samples
Add an initial test based on the broadcast audio source/sink samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
sink received, and if over a threshold, passes the test.

This test can be expanded after to cover more functionality from
these samples.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 15:17:15 +01:00
Johan Hedberg
149b00f70c acpi: Fix acpi_get_irq_routing_table() rt_size parameter meaning
The acpi_get_irq_routing_table() takes a pointer to an array of
ACPI_PCI_ROUTING_TABLE elements rather than a generic buffer pointer
(e.g. void *).

Because of the above, it makes sense to specify the array size as an
actual ARRAY_SIZE() value, since it makes no sense to accept buffers
which are not a multiple of sizeof(ACPI_PCI_ROUTING_TABLE) long.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-06 12:32:31 +01:00
Francois Ramu
0dcaa4c668 boards: arm: stm32f746 with all mpu regions when testing in userspace
Disable the  quadspi mpu region of the nucleo_f746zg
when testing the samples/userspace/shared_mem
or tests/kernel/mem_protect/userspace
The stm32f7 cortex M7 has 8 MPU regions and the one for quadspi prevents
the testcase to PASS.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-06 12:32:08 +01:00
Armando Visconti
f39dba5da5 drivers/sensor: lsm6dsv16x: add in DT both INT1 and INT2 pin
Add in DT the possibility to configure both INT1 and INT2
pin. The driver will then assign one of the two (either 1
or 2, according to what value drdy_pin is set) to a gpio
for receiving drdy interrupts.

The other pin may be used in the future to receive event
interrupts.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-06 10:13:38 +01:00
Moritz Fischer
016a113eb5 boards: xtensa: Add support for Lolin S2 Mini
Add support for LOLIN S2 Mini board, a cheap board
also sold as Wemos S2 Mini.

Signed-off-by: Moritz Fischer <moritzf@google.com>
2023-11-06 10:12:36 +01:00
Alberto Escolar Piedras
c914c512a0 samples/tests: Remove REQUIRES_FULL_LIBC=y due to LIBLC3
As now this is handled by the LIBLC3 kconfig

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-06 10:10:27 +01:00
Andrei Emeltchenko
fa6c281d82 tests: thread_apis: Change printk and TC_PRINT to LOG
Replace combination of printk() and TC_PRINT() to LOG_DBG() disabled
by default so that it does not affect execution time.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-06 10:08:27 +01:00
Andrei Emeltchenko
84317da082 tests: thread_apis: Make local functions static
Most of the local functions are static, make code consistent by making
remaining functions static as well.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-06 10:08:27 +01:00
Emil Gydesen
9a73cbadc0 tests: Bluetooth: Update BAP broadcast tests to use sync
Update the BAP broadcast tests to use the BSIM sync API
instead of sleeps, to ensure that everything is sent
and receive correctly, regardless of timing.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-06 10:03:45 +01:00
Emil Gydesen
b2174662d6 tests: Bluetooth: Audio: Add BSIM sync API
Add mechanism and API to sync devices via the babblesim
backchannels.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-06 10:03:45 +01:00
Andrei Emeltchenko
a6da17aab4 tests: k_mbox: Change ZTEST_USER to ZTEST
Since userspace is not enabled change ZTEST_USER to ZTEST to not
confuse people, other tests are also ZTEST.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-05 07:51:59 -05:00
Andrei Emeltchenko
6247dddcb5 tests: k_mbox: Remove unneeded k_sleep()
The test_multi_thread_send_get() test sends and receives mbox messages
with K_FOREVER as timeout, so k_sleep() is not needed here.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-05 07:51:59 -05:00
Andrei Emeltchenko
6308528e5b tests: k_mbox: Simplify code and check return code
k_mbox_get() / k_mbox_put() get timeout as is, so there is no need for
extra code. Also check that k_mbox_put() actually sends message.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-05 07:51:59 -05:00
Greter Raffael
774858c6dc ztest: Add comfort functions for non-zero return codes
Many functions return non-zero return codes on errors. I added an assert
for the case, when a function is expected to fail. It is just a
shorthand for `zassert_not_equal(0, ret);`, analogous to
`zassert_ok`, introduced in c5d85e175f.

I also added the corresponding `zassume_nok` and `zexpect_nok`.

Signed-off-by: Greter Raffael <rgreter@baumer.com>
2023-11-04 07:39:46 -04:00
Alexander Razinkov
5725585112 tests: kernel: common: added test on atomic_t overflow
Added test to verify that the value of atomic_t will be the same
in case of overflow if incremented in atomic and non-atomic manner

Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
2023-11-04 07:38:39 -04:00
Alexander Razinkov
8fe8f34169 tests: kernel: spinlock: acquisition fairness test
Added test to verify the spinlock acquisition fairness
in relation to the CPUs contending for the spinlock.
This test is only enabled for Ticket Spinlocks which
required to provide such kind of fairness.

Signed-off-by: Alexander Razinkov <alexander.razinkov@syntacore.com>
2023-11-04 07:38:39 -04:00
Anas Nashif
a08bfeb49c syscall: rename Z_OOPS -> K_OOPS
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
9c4d881183 syscall: rename Z_SYSCALL_ to K_SYSCALL_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
9c1aeb5fd3 syscall: rename z_user_ to k_usermode_
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
70e791905d syscall: rename z_user_string_nlen -> k_usermode_string_nlen
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
21254b2f40 syscall: rename z_object_validate -> k_object_validate
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
c25d0804f0 syscall: rename z_object_find -> k_object_find
Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
43a7402baf syscall: rename z_object_recycle -> k_object_recycle
Rename z_object_recycle and do not use z_ for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
d178b6a0e7 syscall: z_obj_validation_check -> k_object_validation_check
Rename z_obj_validation_check  and do not use z_ for internal APIs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
4d5d04169d syscall: rename z_is_in_user_syscall
Rename z_is_in_user_syscall -> k_is_in_user_syscall

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
4e396174ce kernel: move syscall_handler.h to internal include directory
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
a6b490073e kernel: object: rename z_object -> k_object
Do not use z_ for internal structures and rename to k_object instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
c91cad735a kernel: object: rename z_object_init to k_object_init
Do not use z_ for internal API and rename to k_object_init.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Anas Nashif
c54fb959e3 kernel: objects: rename z_dynamic_object_aligned_create
Do not use z_ for internal APIs and rename function.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-03 11:46:52 +01:00
Daniel DeGrasse
3cf254434d tests: drivers: spi: improve spi_loopback async test
Add the following improvements to the spi_loopback async test:
- Verify that a set of multiple spi_buf structures can be sent
  successfully
- Check that the contents of the RX and TX buffers match after transfer
  completion

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-03 11:46:35 +01:00
Fabio Baltieri
dd178ce311 scripts: check_init_priorities: rework the error messages
The current error messages are a bit cryptic, rework them to make them
more meaningful:

- add an extra message on the first error to explain what the errors
  refer to.
- rework the error message to be more explicit.
- rework the priority string print to use a LEVEL+offset format to
  somehow highlight that the number is the offset from the level, not
  the actual priority.
- print the init function name in addition to the devicetree path.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-03 11:45:23 +01:00
Fabio Baltieri
2a70c31945 scripts: check_init_priorities: drop the same priority check
Since bb590b5b6e introduced ordinals in the priority sequence, the "same
priority" case cannot happen anymore, furthermore the priority value in
the script is now the position of the function in the init sequence, so
if two devices have the same priority there's something real bad going
on.

Drop all the "same priority" handling code and tests, convert the case
into ane exception instead. Drop the init stubs as well from the test,
they are not required anymore.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-03 11:45:23 +01:00
Mathieu Choplain
4750cbab1e tests: drivers/adc: Add STM32L4R9I-DISCO overlay
Adds the required overlay for test to build and
pass successfully on STM32L4R9I-DISCO board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2023-11-03 11:44:55 +01:00
Eduardo Montoya
1d0dda794c net: pkt: remove redundant net_pkt_cb_ieee802154 fields
Remove redundant `arb` and `fv2015` fields.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2023-11-03 11:44:40 +01:00
Marc Lasch
73bab817a0 net: lwm2m: Remove the resource type in registration message
Do not include the resource type (rt=) in the registration message when
using the OMA JSON format. This was a workaround specifically for the
Wakaama LwM2M server which is no longer needed since the latest master
branch.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2023-11-03 11:44:28 +01:00
Bjarki Arge Andreasen
b290ba806d tests: serial: uart: emul: Update isr rx/tx tests
The tests for ISR rx/tx must now be updated to send and
receive bytes in smaller chunks.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bjarki Arge Andreasen
d89cef7e19 tests: drivers: serial: emul: Synchronize UART ISR tx/rx
Add synchronization using semaphores for the UART ISR tx/rx
tests, instead of relying on a single k_yield() call to
ensure all UART ISR work can be completed before validating
the result.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bjarki Arge Andreasen
54378c18e0 tests: drivers: serial: emul: Store buffers in fixture
Most tests define a buffer for UART data on the stack,
including the tests testing UART IRQ. Move buffers to
static memory, within the test fixture, which can then
be passed as the user_data to the UART IRQ callback.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Alberto Escolar Piedras
a0ed29409b tests bsim: Add tests for unicast client/server samples
Add a test based on the unicase client/server samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
client received, and if over a threshold, passes the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-03 08:35:38 +01:00
Bartosz Bilas
e87fd3165f drivers: regulator: add MAX20335 driver
Add a MAX20335 MFD subdriver to manage the built-in PMIC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-02 20:32:40 +00:00
Johan Hedberg
caf299ca23 boards: x86: Indicate ACPI support where applicable
There are several x86 boards that support ACPI, so indicate it in their
yaml files.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-02 14:04:07 +00:00
Johan Hedberg
a77871b2e5 tests: Add ACPI test application
Add basic ACPI test application. Initially there are only tests for one
ACPI table (MCFG) and fetching the ACPI PRT, but this is already a good
start for caching regressions on the supported boards.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-02 14:04:07 +00:00
Alberto Escolar Piedras
90fec53381 tests nrf_rtc_timer: Avoid failures w NRF53_SYNC_RTC enabled
This test assumes it can use all configured
NRF_RTC_TIMER_USER_CHAN_COUNT,
But the sync RTC code uses one while it synchronizes.
Let's just disable it the sync rtc.

This fixes an issue where the test fails for a simulated
nrf5340.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-02 14:35:03 +01:00