Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.
Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.
To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.
This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.
The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit replaces exact time compassion by a range check, allowing
the tests to pass on platforms which needs rounding in __ticks_to_ms()
and _ms_to_ticks().
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.
Also, minor dependency, etc. tweaks are made.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The frdm_kw41z runs at a much slower clock frequency than the frdm_k64f.
Increase the k_poll timeout in the asynchronous callback thread to allow
the spi transaction to complete on frdm_kw41z.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The testcase was using only SYS_LOG_ERR() to signal error conditions,
which would print useful error information to the console, but allow the
test to pass when it should fail. Add zasserts after every SYS_LOG_ERR()
to make the test fail properly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The asynchronous callback thread was overflowing its stack and causing a
bus/mpu fault when hardware stack checking is enabled. Increase the size
of the stack.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Make it possible to have multiple identity addresses as an LE
peripheral. For central role only the default identity is supported
for now. This also extends the flash storage in a backward compatible
way.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add system calls for the zsock implementations of socket,
close, bind, connect, listen, accept, sendto, recvfrom,
fcntl, poll, inet_pton, and getaddrinfo.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Refactored test to work with ztest framework
and to calculate and display time in milliseconds
for each power state.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
In addition to testing all the APIs, this enhancement
tests the following two scenarios
- when multiple threads use a single key for storage
- when a single thread associates its value with
multiple keys
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
This stub was forcing this configuration option that is not neccesary
and the configuration system is complaining about it, failing most
Arduino101 stub builds.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
These are no longer required. Kconfiglib expands references to
environment variables directly.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The test read_kobject_user_pipe() is called twice in
the test suite. There is no need of calling same test
twice. Removing the extra call.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
As ethernet_api is larger than net_if_api, and we are accessing
ethernet_api elements in ethernet L2 driver, then invalid memory
was accessed in L2 ethernet.c.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add new test cases to validate dynamic memory allocation
functions such as malloc, calloc, realloc using minimal libc
and newlibc implementation of standard C library.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
This adds two test cases to create dynamic threads, and one test
case to make sure permissions are set correctly.
Origin: Original
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The kernel.queue.poll test fails if CONFIG_MAX_THREAD_BYTES is larger
than 2, complaining about no memory for semaphore object. Turns out
the memory pool is not large enough. So make it a bit larger.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Make sure that net_if_ipv6_select_src_iface() returns correct network
interface for a given destination address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
With this commit all Qav parameters are tested and the fake driver
properly stores and recalculates info about all the Qav parameters to
make them available for read-back.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The new mappings require at least two traffic classes so there are fewer
tests than there are for the strict mapping.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
In coap module previous test cases are modified as well as
new test functions are added to increase the code coverage
Signed-off-by: Tarun Kumar Agarwal <tarun.kumar.agarwal@intel.com>
Input length was accounting TC_AES_BLOCK_SIZE twice and consequently
not considering the whole cipher.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>