If pkt allocation fails, then prepare to handle NULL pointer.
Coverity-CID: 195880
Coverity-CID: 195816
Fixes#14413Fixes#14395
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If pkt allocation fails, then prepare to handle NULL pointer.
Coverity-CID: 195835
Fixes#14409
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove use of select to "force" enabling other configs in subsys/fs
and subsys/net/l2. The forcing will cause infinite kconfig recursion.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Update reserved function names starting with one underscore, replacing
them as follows:
'_k_' with 'z_'
'_K_' with 'Z_'
'_handler_' with 'z_handl_'
'_Cstart' with 'z_cstart'
'_Swap' with 'z_swap'
This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.
Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.
Various generator scripts have also been updated as well as perf,
linker and usb files. These are
drivers/serial/uart_handlers.c
include/linker/kobject-text.ld
kernel/include/syscall_handler.h
scripts/gen_kobject_list.py
scripts/gen_syscall_header.py
Signed-off-by: Patrik Flykt <patrik.flykt@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>
Ram back-end was unnecessary included in non qemu test which
increased RAM footprint much.
Patch includes ram backend into build only for qemu_x86 build.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Use the new net_pkt allocator. Fix a small leak in the test as well.
No need to build the net_pkt, just send the data directly through
net_context_sendto_new()
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The very first test was basically testing the checksum calculation. And
that's already tested in more relevant tests. It was also trying in a
cumbersome way to generate packets scattered over many net_buf. But
that's also already tested in various other tests, and it's not at all
part of core utils anyway.
In any case, that all redundant, so let's remove it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to build the net_pkt, just send the data directly through
net_context_sendto_new()
Use the new net_context option to enable timestamping of outgoing
packet (NET_CONTEXT_TIMESTAMP).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Just a quick rm/mv. The new API is going to be the only one, so legacy
test can disappear.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to build the net_pkt, just send the data directly through
net_context_sendto_new()
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
s/0/K_NO_WAIT for all timeouts
And fix tcp context connect call (it's not net_context_listen obviously,
and one parameter was missing).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
No need to build the net_pkt, just send the data directly through
net_context_sendto_new()
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
We use to define the SPI bus device name in Kconfig, however now that
all SPI bus controllers use DTS that comes from DTS, so SPI_1_NAME is
never set to anything. So remove it and leave it to the config frag in
the boards dir in the test to set the name.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Minnowboard should not run the XIP test as it doesn't execute-in-place.
Updated the test specification to exclude Minnowboard.
Fixes#14099.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The heap, plus a few globals relevant to mbedtls get put in
their own memory partition.
With systems that have power-of-two region size/alignment
constraints, this results in a 64K partition being created,
even though we are using just a whisker above 32K.
Lower the heap size a little so everything fits in 32K.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fix multiple definitions of `ram_console'. The ram_console
array is already defined in drivers/console/ram_console.c.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
If peer socket closed, the other side should get 0 from recv(), and
should get in stable manner (no matter how much time went from the
closure and/or how many times recv() is called).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Fix issue reported by coverity regarding using volatile
variables in zassert_equal macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fix issue reported by coverity regarding using volatile variable
in zassert_equal macro.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
net_pkt_alloc_with_buffer() takes IP header and protocol header
length while calculating total length internally. Need not
specify explicitly. Also mutex was not properly initialized.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The mbedtls library has some globals which results in faults
when user mode tries to access them.
Instantiate a memory partition for mbedtls's globals.
The linker will place all globals found by building this
library into this partition.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We were reporting results twice, something that might confuse test
systems and end up reporting wrong results. Assert if any self-tests
have failed and report at the very end.
Disable test on x86_64.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
These tests fail on hardware. An appropriate issue will be filed on
GitHub, but it doesn't make sense to hold the CI from going green.
Fixes#13960.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
It was possible via Kconfig to assign any partition for FCB using
its number. Partitions flash_area_id becomes non predefined
(are auto-generated). So it is possible only to guess which
number will be signed to certain area.
Unfortunately it is not possible to transfer FLASH_AREA_XXX_ID
label via Kconfig.
Patch assigns settings to the storage partition and remove
SETTINGS_FCB_FLASH_AREA property from settings Kconfig.
fixes#13388
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This part of tests was forgotten when we move to subsys/
Fixes#13729
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This patch adds overlay for nrf52_pca10040 and reel board to use
btp tester. These are based on nrf52840.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
We want to show that performing various memory domain
operations, and then either dropping to user mode, or
swapping to a user thread in the same domain, has the
correct memory policy for the user context.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>