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>
As the test is testing neighbor discovery which needs to know
link addresses, we must run the test using Ethernet L2.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Remove redundant 'n' defaults. 'n' is the default value for bool
symbols.
This makes the auto-generated documentation clearer as well: You get
"implicitly defaults to n" instead of
"- n if <propagated dependencies>".
- Shorten
<type>
prompt "foo"
to
<type> "foo"
This works for all types, not just bool.
- Various formatting nits.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
There are too many individual requests for Qav related parameters. There
are more Qav parameters that need to be supported (and will be supported
soon - both on the GET and SET side). Handling it the way it was handled
so far would render the eth mgmt API dominated by Qav parameters. That
would make the file hard to read and understand.
Instead of that - use a single GET and SET requests for all Qav
parameters. This works by adding a separate enum with Qav request type
to the ethernet_qav_param struct.
Additionally this approach makes it much easier to document it all since
we now have just a single request and documentation comments in the
ethernet_qav_param struct.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Add descriptions and doxygen groups for app_memory,
stack_protection, stack_randomization and
obj_validation.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
This commit changes how the fake driver stores info about priority
queues. This allows it to test the Qav status API.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Test that we can define our own system calls in application code
and that fault handling works properly.
Additional tests for base system call infrastructure, outside of
specific system calls, go here.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add basic IPv4 Link Local support as described in RFC 3927.
Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It shouldn't be necessary to disable the mpu for this test. Enable
CONFIG_MPU_ALLOW_FLASH_WRITE=y instead.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The flash API requires write protection to be disabled before erasing
the flash. It appears that the nordic platforms for which this test was
originally implemented do not enforce the requirement to disable write
protection. The mcux flash driver, however, does enforce the
requirement, so fix the test to make it work on kinetis platforms.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Some drivers or tests need to execute some code before Zephyr is
booted, dynamically register command line arguments, etc.
For this purpose, we generalize the NATIVE_EXIT_TASK to also
provide hooks to run a function at a given point during the startup
of native_posix.
Also, test/boards/native_posix/exit_tasks is generalized to cover
this new functionality.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Test to verify k_thread_user_mode_enter() when usermode is
not enabled or supported by architecture. The thread which calls
k_thread_user_mode_enter() with CONFIG_USERSPACE disabled or
architecture doesn't support usermode, should be marked
as usermode and if it is essential, then it has to be cleared.
This is added to improve code coverage.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Some Ethernet devices can filter out incoming packets through a list of
valid MAC addresses, so let's add a way to expose this capability, using
it through the ethernet device API.
Fixes#7596
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Disable CONFIG_I2C and CONFIG_SPI for minimum footprint test,
since we are doing "minimum" footprint.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit adds the get_config callback to the fake driver and makes
use of it to get the number of priority queues. That number is in turn
used in Qav tests.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
New testcase sets max value to zero and checks if install function
fails.
Improvement introduces k_yield and k_sleep in while loops to make zephyr
responding.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>