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>
The options array was not initialized to 0 and the size of the
array was not set properly. This caused following error in valgrind
Conditional jump or move depends on uninitialised value(s)
at 0x8056777: coap_find_options (coap.c:1096)
by 0x804AEFF: test_parse_simple_pdu (main.c:455)
by 0x80500E6: zephyr_app_main (main.c:1585)
by 0x807E231: bg_thread_main (init.c:254)
by 0x80842D7: _thread_entry (thread.c:201)
by 0x8059618: posix_thread_starter (posix_core.c:301)
by 0x40752C8: start_thread (in /usr/lib/libpthread-2.25.so)
by 0x4182055: clone (in /usr/lib/libc-2.25.so)
Fixes#7447
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Test case should first check for next block in the coap packet and
unref the packet (assuming packet has been sent).
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
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>
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware. Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
From RFC 7252, section 3
"The absence of the Payload Marker denotes a zero-length payload.
The presence of a marker followed by a zero-length payload MUST
be processed as a message format error."
Check empty payload when COAP_MARKER is found and add a test case to
cover it
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
The payload variable was one byte long but we read 32 bytes
from it.
Coverity-CID: 178064
Fixes#4397
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
ZoAP tests are modified to use new CoAP API. Also modified tests
name from 'zoap' to 'coap'.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>