Close test sockets in test_send_recv_2_sock() to avoid Coverity
warnings.
Coverity-Id: 182764
Fixes: #6107
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add zassert's to check results of intermediate operations like
socket/bind/connect. Also, use symbolic expressions instead of
constants like 4 (for data length).
Coverity-Id: 182765, 182767
Fixes: #6104, #6106
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Previously, some fields like sin6_scope_id weren't explicitly
initialized. Such aren't really used, but to keep Coverity
happy, let's zero out the entire address structure.
Coverity-Id: 182763
Fixes: #6108
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add support for MSG_PEEK flag in recv and recvfrom.
This flag is needed when using non-zephyr embedded applications with
Zephyr's socket API.
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
Relies on loopback network interface added recently and being able
to run QEMU without connecting to host networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
- Add test cases of ipv4/ipv6 sendto() and recvfrom()
- Set the main stack size to 2048 to enable both ipv4 and ipv6 on
qemu_x86.
- Use net app for network setup.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.
Additionally, the TUN options is removed. This option was not used
anywhere.
To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
A number of the network tests have minimal memory requirements that not
all boards are able to meet. Add in those memory requirements so we
don't attempt to build these tests for those platforms. Utilized the
frdm_kl25z (with 16K of memory) and cc2650_sensortag (with 20K) to test
the limits.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Instead of only running net tests in qemu_x86, enable those
tests in all suitable platforms. The tests are disabled for
bbc_microbit as that platform does not have enough memory.
The tests/net/arp and tests/net/ieee802154/l2 are disabled
for qemu_xtensa as the qemu crashed when running the tests.
For tests/net/all there was a weird build error for qemu_xtensa
so that test is also disabled for that platform.
Increased the trickle timeout to 3 secs in tests/net/trickle as
occacionally there was timeout error in qemu_cortex_m3 when the
test was run.
Jira: ZEP-2398
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>