Minor change to make test names consistent with other tests using ztest.
All test functions need to start with test_.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
A red-black tree is maintained containing the metadata for all
dynamically created kernel objects, which are allocated out of the
system heap.
Currently, k_object_alloc() and k_object_free() are supervisor-only.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The only difference between this call and k_thread_abort() (beyond
some minor performance deltas) is that "cancel" will act as a noop in
cases where the thread has begun execution and will return an error.
"Abort" always succeeds, of course. That is inherently racy when used
as a "stop the thread" API: there's no way in general (or at all in
SMP situations) to know that you're calling this function "early
enough" to catch the thread before it starts.
Effectively, all k_thread_cancel() gives you that k_thread_abort()
doesn't is an indication about whether or not a thread has started.
There are many other ways to get that information that don't require
dangerous kernel APIs.
Deprecate this function. Zephyr's own code never used it except for
its own unit test.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
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>
Following tests were failing on a microcontroller with 32KB flash:
test-mbedtls
kernel.common
The min_flash option has been added in the test case yaml files.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
In Zephyr this has no effect because getaddrinfo() returns a pointer
to a static array, but Coverity scan checks for this pattern.
Coverity-CID: 185273
Coverity-CID: 185279
Fixes#7085Fixes#7091
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
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>
Min RAM requirement for tests/net/utils was 16K,
hence run on nucleo_l073rz.
Though, build size is a little more than 20K which
overflows board RAM.
Increase min RAM requirement for this test to 24K
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This will prevent building these tests for boards not supposed to run
a TCP/IP stack, particularly 96b_carbon_nrf51 where test-with-dns
would not fit into 32 kB of RAM.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This adds a translation layer to make the nrfx driver for the nRF SPIM
(SPI Master with EasyDMA) peripheral accessible via the Zephyr's API.
The shim is provided only for nRF52840 because of a hardware anomaly
present in nRF52832. See Anomaly 58 (SPIM: An additional byte is clocked
out when RXD.MAXCNT = 1) in Errata for this chip.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Drivers will be directly contacted via net_if's offload attribute. No
need for a an extra layer as an L2.
Signed-off-by: Dario Pennisi <dario@iptronix.com>
Signed-off-by: Massimiliano Agneni <massimiliano.agneni@iptronix.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
1. Add a tag in the testcase.yaml to deal with the following error from
sanitycheck:
E: tests/lib/rbtree/testcase.yaml: can't load (skipping):
<NotMappingError: error code 6: Value: None is not of a
mapping type: Path: '/'>
2. Reduced the MAX_NODES so the test will build on small memory systems
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Returns true if the specified node is in the tree. Allows the tree to
be used for "set" style semantics along with a lessthan_fn that simply
compares the nodes by their address.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Test for the rbtree balanced tree.
The theory here is that the test uses a PRNG to randomly build and
modify trees build from an array of node objects (whose comparison
operator is just their memory address). It begins with tiny node
sets, so as to catch edge cases (e.g. nodes being the root, or a leaf,
or parent/child) in the balancing algorithm before increasing the size
and continuing.
At each iteration the resulting tree is walked, verifying that it
contains exactly the nodes that we expect it should, that they appear
in the correct sorted order in the walk, that their local structure
matches a correct binary tree, and that the red/black rules are
followed always:
* The root must be black
* Red nodes can have only black children
* The path from the root to any NULL child pointer in the tree must
cross the same number of black nodes.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Following tests were failing on a microcontroller with 32KB flash:
benchmark.application
crypto.ecc_dh
crypto.ecc_dsa
test_build_ethernet
test_build_sensors_a_m
The min_flash option has been added in the test case yaml files.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
The test actually has three network interfaces in native_posix board
and not two so check that correctly.
Fixes#6988
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Curently only link speed is exposed.
Opportunity taken to remove any post-fix enumerating the iface init
and/or the api: these must be generic and used by all the instances.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The test case checks that many of the common header files are C++
compatible and checks that some of the primitives like ARRAY_SIZE
work.
Signed-off-by: Michael Hope <mlhx@google.com>