The default main stack is too small for some boards so increasing
it to 2048. The issue was seen with sam_e70_xplained.
Fixes#19762
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is bad practice and may conceal issues on platforms
not in the whitelist.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We need to increase the stack size of the main thread, to
avoid stack overflow, when executing the tests on various
platforms.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
CONFIG_MAIN_STACK_SIZE was originally 1344 in this test. The following
commit removed setting the stack size in the test:
commit 7b3cd7d371
Author: Cami Carballo <cami.carballo@intel.com>
Date: Fri Jul 26 10:59:16 2019 -0400
tests: net: increase stack size
However getting the default stack size on FRDM-K64F of 512 causes the
following panic:
FATAL: ***** BUS FAULT *****
FATAL: Stacking error
FATAL: Imprecise data bus error
FATAL: NXP MPU error, port 3
FATAL: Mode: Supervisor, Data Address: 0x20002ff0
FATAL: Type: Write, Master: 0, Regions: 0x8200
FATAL: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000
FATAL: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000000
FATAL: xpsr: 0x200002f4
FATAL: Faulting instruction address (r15/pc): 0x00000000
FATAL: >>> ZEPHYR FATAL ERROR 2: Stack overflow
FATAL: Current thread: 0x2000182c (main)
FATAL: Halting system
Bump stack back to original 1344 fixes the issue.
Fixes#18292
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This board and SoC was discontinued some time ago and is currently not
maintained in the zephyr tree.
Remove all associated configurations and variants from the tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/util.h to sys/util.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
move misc/printk.h to sys/printk.h and
create a shim for backward-compatibility.
No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.
Related to #16539
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This function uses mqtt_read_publish_payload_blocking to perform a
blocking read of the specified number of bytes.
When reading out a payload, the normal use case is to read the
entire payload. This function facilitates that use case.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It is convenient to have a blocking version of
`mqtt_read_publish_payload` function, for cases when it is called from
the event handler. Therefore, extend the 'mqtt_read_publish_payload'
argument list with information whether the call should block or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fixes the compile errors in various platforms like:
* sam_e70_xplained (too few network buffers)
* galileo, cc3220sf_launchxl and mps2_an385 (missing random number
generator configuration options)
Fixes#15878
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.
Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.
This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.
tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.
Fixes: #15103 (and probably others)
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This lets us quickly filter tests that exercise userspace
when developing it.
Some tests had a whitelist with qemu_cortex_m3; change
this to mps2_an385, which is the QEMU target with an
MPU enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Various globals for the test cases have been moved to
the ztest memory domain data section via ZTEST_DMEM tags
so that user mode can access them.
Some anonymous arrays whose address was being placed in
the msg_subackX structs have been split out so they
are in ztest memory domain.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If the rc = -EAGAIN from mqtt_read_publich_payload(), it shouldn't be
used in memcpy() since it is a negative value, and instead, it should
try to read again.
Fix: #13825
Coverity-CID: 191002
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Port all users of 'set_conf_file' to use the built-in rules
instead. This follows the convention-over-configuration principle to
make the system as a whole simpler and more consistent.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fixed typo: CONFIG_NET_NET_PKT_LOG_LEVEL_DBG, removed extra _NET.
Removed debug macro CONFIG_NET_DEBUG_NET_PKT that is not used.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
As the legacy library has been removed, we no longer need to
differentiate betwen MQTT implementations. Therefore align the library
folder name with other libraries and remove the `_sock` suffix.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
As we are removing net_app and net_pkt based libraries and
applications, CoAP legacy based libraries and apps are moved
to socket based implementations. So removing legacy CoAP.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The disabled test causes crash in qemu_x86, so temporarily disable
it until a proper fix is found.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit makes the necessary changes to allow the following tests
to run on cc3220sf_launchxl:
- mqtt_packet
- mqtt_publisher
- mqtt_subscriber
- mqtt_pubsub
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The old legacy APIs use net-app library and as that is being
removed, then the dependencies need to be removed also.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move to latest cmake version with many bug fixes and enhancements.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Remove network specific default and max log level setting
and start to use the zephyr logging values for those.
Remove LOG_MODULE_REGISTER() from net_core.h and place the
calls into .c files. This is done in order to avoid weird
compiler errors in some cases and to make the code look similar
as other subsystems.
Fixes#11343Fixes#11659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Many tests use either Ethernet or Dummy L2 and as such require
modifications towards the driver API on their fake devices.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Two separate folders and Kconfig options causing confusion on
CoAP and CoAP_SOCK implementations. This patch simplifies it.
Current CoAP Kconfig option moved to COAP_NET_PKT.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename existing headers and sybols to mqtt_legacy, to allow new
implementation to keep old config and header names.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.
This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.
Signed-off-by: Reto Schneider <code@reto-schneider.ch>
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.
The only directory excluded directory was ext/* since it contains
only imported code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Run networking tests for native_posix, qemu_x86 and qemu_cortex_m3
platforms only as the tests are generic enough so no need to run
them in real physical device.
Fixes#9623#9614#9622#9621#9618
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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 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>
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>