Implements the PBP commands of the BTP specs, in order to support
testing the PBP through autopts. This PR is in conjunction with the
following PR in AutoPTS: https://github.com/auto-pts/auto-pts/pull/1356
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
For some target and optimization level combinations (aarch64 and -O2, for
example), GCC will over align _isr_list_sname instances. The local isr
declaration parser doesn't expect the extra padding that may be introduced
and will produce unexpected errors about bad IRQs (`error: IRQ 1903323438
(offset=0) exceeds the maximum of 42`, for example). Prevent this issue by
forcing the expected alignment of _isr_list_sname.
Fixes#81254
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
Current test gpios conflict with I2C SCL and SDA lines. In order to run
both I2C and GPIO test on hardware, change pins used used in
gpio_basic_api test.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Thread abort of essential threads had a buglet where the panic would
be signaled but, if caught by k_sys_fatal_error_handler(), the thread
would not actually be aborted. This test wasn't validating that the
thread was actually dead (in fac, it RELIED on the thread to signal a
semaphore after its "abort"!).
Make sure it's dead and that the panic is caught. Also add a case for
aborting _current which is a separate code path that needs coverage.
Signed-off-by: Andy Ross <andyross@google.com>
Fixed the following issues:
1) Missing guard before accessing parameters
2) Fixed bad sizeof when resetting
3) Fixed several bad offsets when removing attributes
Added tests to verify that it works now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds a variation of the test which tests swap using offset mode,
based on the swap using move test
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a variation of the test which tests swap using offset mode,
based on the swap using move test
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit introduce support for maps in a yaml list.
The yaml_set() function has been extended with the following signature:
> yaml_set(NAME <name> KEY <key>...
> [APPEND] LIST MAP <map1> MAP <map2> MAP ...
> )
where a `MAP <map>` has the form:
`MAP "<key1>: <value1>, <key2>: <value2>, ...`
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Include explicitly `logging/log_backend.h` header so that non POSIX
boards can build this test. For POSIX boards, this headers was indirectly
included through `ztest.h`->`ztest_assert.h`->`tc_util.h`->`log_ctrl.h`.
Fixes#85441
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Allow dynamic allocation of USB devices on connected event.
Add very basic USB device validation and configuration.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Validate that the connection timeout code path works as expected when
the command buffer pool is under stress.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Adds API for Advertising Coding Selection.
Introduces two new advertising options to configure the advertiser's
requirement concerning coding scheme when LE Coded PHY is configured.
While the Bluetooth v6.0 specification makes a distinction betweeen
preferred and required advertising PHY options, a simplification is
made to only expose the required PHY options. Inline with how LE Coded
PHY is implemented; this API will set both the primary and secondary
advertising PHY's to the same coding scheme.
The support is enabled by CONFIG_BT_EXT_ADV_CODING_SELECTION, and requires
a controller that selects CONFIG_BT_CTLR_ADV_EXT_CODING_SELECTION_SUPPORT.
Signed-off-by: Thomas Deppe <thomas.deppe@nordicsemi.no>
test_arm_user_interrupt and test_arm_null_pointer_exception currently
only print "Skipped" but reports as PASS in twister. This fixes that
misleading report.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
Fix test_flash_area_get_sectors test for platforms
with maximum number of sectors per image slot > 1024.
Increase the support value to 2048.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Added device tree nodes in imx8mp_evk_mimx8ml8_a53.dts, and also
added board overlay in gpio_basic_api test case.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
The previous behavior was to call `fs_sync` on the file after every log
item written. In many cases, log messages come in bursts, and `log_core`
already operates in batches, configurable using
`CONFIG_LOG_PROCESS_THREAD_SLEEP_MS` and
`CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD`. Once the batch is done, the
backends get notified with `LOG_BACKEND_EVT_PROCESS_THREAD_DONE` if any
logs were processed. This is a nice time to `fs_sync` the written changes.
This change both speeds up the time spent writing logs and reduces the
amount of block erases done on the flash, as the previous implementation
erased blocks after each individual log message.
Signed-off-by: Kamil Krzyzanowski <kamnxt@kamnxt.com>
Convert testing of the logging backend for file-system to include the
full implementation.
Need to disable logging and just include the unit under test to make
this simpler.
The API functions for the backend can then be called on the backend
object.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
clean up usage of usage "#ifdef STM32_SRC_SYSCLK"
and code under the "#else" from
test_stm32_clock_configuration_adc.c.
Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
The current watchdog tests assume that watchdog can be configured once
it is running. This is a concept that do not work in practice becasue
most of watchdog once configured will be locked. The tests should take
that in consideration before enable another test. The other important
details is that even when a watchdog is running it should be disable in
some controllers to allow reconfigure.
This change was tested with SAM4L watchdog controller #83475 which
allows reconfigure the watchdog once it is enabled. To do the correct
configuration it is necessary execute the wdt_disable() call.
The change will validate if the watchdog can be disabled for those
cases were the controller is not locked and fallback the test on the
contrary.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Building portability.posix.timers with clang warns:
tests/posix/timers/src/nanosleep.c:180:2: error: variable 'actual_ns' is
used uninitialized whenever switch default is taken
[-Werror,-Wsometimes-uninitialized]
default:
^~~~~~~
tests/posix/timers/src/nanosleep.c:197:15: note: uninitialized use
occurs here
zassert_true(actual_ns >= exp_ns, "actual: %llu expected: %llu",
^~~~~~~~~ actual_ns, exp_ns);
subsys/testsuite/ztest/include/zephyr/ztest_assert.h:275:41: note:
^~ expanded from macro 'zassert_true'
subsys/testsuite/ztest/include/zephyr/ztest_assert.h:194:14: note:
expanded from macro 'zassert'
_zassert_va(cond, default_msg, COND_CODE_1(__VA_OPT__(1),
^~~~ (__VA_ARGS__), (NULL)))
subsys/testsuite/ztest/include/zephyr/ztest_assert.h:191:16: note:
expanded from macro '_zassert_va'
_zassert_base(cond, default_msg, msg, ##__VA_ARGS__)
^~~~
subsys/testsuite/ztest/include/zephyr/ztest_assert.h:180:14: note:
expanded from macro '_zassert_base'
z_zassert(cond, _msg ? ("(" default_msg ")") :
^~~~ (default_msg), __FILE__, \
tests/posix/timers/src/nanosleep.c:152:20: note: initialize the variable
'actual_ns' to silence this warning
uint64_t actual_ns;
^
= 0
Not really necessary since there is a zassert_unreachable(), but doesn't
hurt to initialize the variable.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Building with clang warns:
tests/net/socket/tcp/src/main.c:377:13: error: variable 'c_sock' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
} else if (family == AF_INET6) {
^~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:396:15: note: uninitialized use occurs here
test_connect(c_sock, s_saddr, addrlen);
^~~~~~
tests/net/socket/tcp/src/main.c:377:9: note: remove the 'if' if its
condition is always true
} else if (family == AF_INET6) {
^~~~~~~~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:360:12: note: initialize the variable
'c_sock' to silence this warning
int c_sock;
^
= 0
tests/net/socket/tcp/src/main.c:377:13: error: variable 's_sock' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
} else if (family == AF_INET6) {
^~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:387:12: note: uninitialized use occurs here
test_bind(s_sock, s_saddr, addrlen);
^~~~~~
tests/net/socket/tcp/src/main.c:377:9: note: remove the 'if' if its
condition is always true
} else if (family == AF_INET6) {
^~~~~~~~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:361:12: note: initialize the variable
's_sock' to silence this warning
int s_sock;
^
= 0
Not really needed since we have zassert_unreachable(), but doesn't hurt
to initialize the variables.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
This adds the configuration used when running PTS tests with hci_ipc to
the testcase.yaml, so they are built on integration by CI, avoiding
regression.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
- add nucleo_c071rb overlay file to setup spi and dma nodes
- Add the nucleo_c071rb configuration file to reduce the size of
SPI_LARGE_BUFFER_SIZE to avoid RAM overflow and be able
to run the test.
- update testcase.yaml for CI integration
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- add overlays and kconfig files for nucleo_c071rb board.
- update testcase.yaml for CI integration.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
add the nucleo_C071rb overlay file and enable different types of timers
that support counters.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
- add nucleo_c071rb overlay file to setup adc node
- The C0 serie has two HSI clock sources, HSI48 and HSI48USB.
To make it simpler and compatible with the existing clock driver,
HSI48 is renamed to HSI (node already present in the stm32c0.dtsi).
HSI48USB will correspond to HSI48.
With SYNC mode, we have an overrun on the ADC, so we configure it
in ASYNC mode.
- Update STM32 HSI macro according to changes
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
Add wsen_pads_2511020213301 driver with
the corrected name and compatibility with
the hal update as well as added new features.
Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
Rather than disabling -Wunused-value for the entire file, explicitly
mark variables that are unused.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Instead of disabling the -Wunused-variable warning for the entire file,
we can explicitly mark the variables that are unused with __unused.
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
The current DNS caching logic is not aware of the IP address version.
If there is a cached address for a query, the caller of
dns_get_addr_info() will receive that address, even if it is not the
same version as the caller requested. For example:
- dns_get_addr_info() is called to resolve an IPv4 address
- the DNS client caches the IPv4 address that was received
- dns_get_addr_info() is called to resolve an IPv6 address
- the DNS client sees that there is a cached IPv4 address for the
given query
- the DNS client does not check that the cached address is of the
requested version (IPv6)
- the cached IPv4 address is returned from dns_get_addr_info()
This changes the DNS client to check IP address version when searching
cached addresses.
Signed-off-by: Noah Olson <noah@wavelynx.com>
The LLEXT test suites are quite large, and should not be built
for "small" SoCs. Filter the tests based on RAM and ROM/flash
size. The following test sizes built for nrf52840 where used
to determine min sizes:
Name: Flash: RAM:
llext.loader_build 105 80
llext.readonly 105 79
llext.readonly_mpu 140 95
llext.readonly_mmu 106 145
llext.writable 123 125
llext.writable_relocatable 117 129
llext.writable_slid_linking 108 125
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The test case drivers.eeprom.emul.build requires around 48-58kB of
RAM and 95-119kB of ROM/flash, increase and add these requirenments
to the test case. Similarly add min flash requirenment to
drivers.eeprom.build
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
The stepper driver test cases only specify integration
platforms, which whitelists every other board in tree
for full CI runs. This is not intended as some platforms
are too small to run the test cases.
Whitelist target platforms using platform_allow instead.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Enforces bitness match of ARC compilers and linkers invoked
building LLEXT apps by inheriting -mcpu flag from Zephyr.
The ARC toolchain becomes confused without the -mcpu flag.
On qemu_hs5x we see GCC select elf32-littlearc64 for
linking an object previously compiled as elf64-littlearc64.
Fixes#80949
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>