Fix unintended sign extension (SIGN_EXTENSION).
The result of "coap_block_size_to_bytes() * (iter - 1)"
extending the sign type.
Issue is the conversion of iter from u8_t to int because it's
an unsigned operand in an binary subtraction with 1 which is
a signed operand with higher conversion rank (int).
Fixes#20880Fixes#20881Fixes#20882Fixes#20883
Coverity CID :205780
Coverity CID :205786
Coverity CID :205806
Coverity CID :205808
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
There are two set of code supporting x86_64: x86_64 using x32 ABI,
and x86 long mode, and this consolidates both into one x86_64
architecture and SoC supporting truly 64-bit mode.
() Removes the x86_64:x32 architecture and SoC, and replaces
them with the existing x86 long mode arch and SoC.
() Replace qemu_x86_64 with qemu_x86_long as qemu_x86_64.
() Updates samples and tests to remove reference to
qemu_x86_long.
() Renames CONFIG_X86_LONGMODE to CONFIG_X86_64.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
According to the comment in #20008 I found out that some test cases
for different tests have same names.
To get rid of it, I decided to change test cases names.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Unused after commit a76814bfb6 ("net: Convert core IP stack to use log
levels").
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
If the ICMPv6 test is run in real hw, we need a bit more buffers
to pass the test.
Fixes#19915
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Stack size might be too small when running the test in real
board like sam-e70.
Fixes#19914
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
After run Sanitycheck script I found out that
some test cases have a same test case name
in the test result .xml file.
For boards mimxrt1050_evk, qemu_x86, sam_e70_xplained
in .xml files that cases were dublicated.
Problem happened only with cases net.dns.no_ipv6.init
and net.dns.init. Only that cases were dublicated.
To solve it, I decided to change test cases names for the dns tests.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
This symbol is not user-configurable (has no prompt), so assignments in
prj.conf have no effect on it.
(It has no defaults either, and isn't selected/implied, so nothing in
vanilla Zephyr will ever enable it.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
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>
Re-run with updated script to convert integer literal delay arguments
to k_thread_create and K_THREAD_DEFINE to use the standard timeout
macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The test creates two network interfaces, but does not set MAC
address of one of them correctly (MAC address is all zeros).
This is not good and the issue fixed in commit 9468cb6eb1
could have been revealed earlier.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Replaced net_bytes_from_str in hostname_get test by a new function that
converts the unique part of the hostname in a byte array.
net_bytes_from_str can not be used as it assumes that the string input
is of the format "xx:xx:xx:xx:xx:xx" where as the unique part of the
hostname is a MAC address string without colons. If net_bytes_from_str
is used this could result in buffer overrun on the input string.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
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>
Make sure net-shell is started properly and it does not crash.
The purpose of this test is to catch issues described in #19178
where UART was not working which was seen as net-shell crashing
at startup.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that resolving IPv4 address but returning IPv6 address
(and vice versa) is failing and we catch that scenario.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Got several sanity failures with this information
Assertion failed at tests/net/socket/poll/src/main.c:76: \
test_poll: (tstamp >= 30U && tstamp <= 30 + FUZZ is false)
In one of the failed tests, the tstamp was 50. Dunno what is
wrong here but in order to proceed with this, increasing the
timeout temporarily. This commit can be removed if the root
cause for this timeout is figured out.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Moving Kconfig options from testcase.yaml file to prj.conf so
that we can run the test app easily from command line and without
sanitycheck.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This was only used on the Quark SoCs. It is no longer used, can no
longer be tested, and it's reliant upon the deprecated legacy PCI
subsystem. Remove it to prevent bitrot.
Signed-off-by: Charles E. Youse <charles.youse@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>
A second semaphore is used for the second trickle timer, so that if the
first timer expires twice before the second one, the test would still
wait before proceeding to check on cb_2_called.
Fixes#18598.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
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>
We are trying to pass 64-bit value to the driver, but we only
allocate space for an integer. This will not work and will cause
invalid memory access.
Fixes#18205
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add new tests that make sure that sendmsg() works when using
connected UDP socket and when not setting msghdr destination
address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is an implementation of 6LoCAN, a 6Lo adaption layer for
Controller Area Networks. 6LoCAN is not yet standardised.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Rename the socket_can implementation from CANBUS to CANBUS_RAW.
This is a preperation for 6LoCAN which is a CANBUS L2 for IPv6.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
An issue was seen after changes introduced in #17933.
The net_context callback was run after we checked that it
was run ok. This test failed of course in that case. Simple
solution is to k_yield() which will make sure that the
callback gets called before we continue. This works for this
test as our threads have suitably selected priorities.
There is also no need to use K_NO_WAIT here so replacing the
timeout with K_FOREVER.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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>
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>
The testcases are adapted to handle more than one net buffer in
a net_pkt. After the IPHC optimization it is possible that IP header
is not in the same buffer than the UDP header.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Make sure that SO_TXTIME socket option can be set and get.
Verify also that TX time is passed properly to network device
driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Noticed this error print when running in mps2_an385 platform.
<err> net_if: There is no network interface to work with!
Adding CONFIG_NET_LOOPBACK=y removes this error. After this
the CONFIG_NET_IPV6_MLD=n needed to be added in order to avoid
crashes when IPv6 MLD is done which is not needed for this test.
Removed also the whitelisting as that is not really needed and
we want to run these in as many platforms as possible.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>