In the FIN_WAIT_1 any incoming data is dropped, but anknowledged. Add a
check to see if the data is already acknowleged to prevent double
acknowledging of the data and bringing the acknowlegde counter out of
sync. When the acknowledge counter gets out of sync, the connection will
never properly terminate any more.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As the test suite is intended to run over loopback interfce, use
loopback address and skip configuration of other addresses.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Disable unstable tests cases for mps2_an385, which fail sporadically
due to timer stability issues on that platform (see #48608).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
It can happen that two similar stacks enter a retransmission cycle
due to a packet collision. If the transmission timeout is the same
both stacks will retry at the same moment resulting in another
collision.
By introducing a randomized retry timeout, the chance of
a second collision is reduced and it reduces furter the more
retransmissions occur.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Fixes: #38403
Adding NET_DRIVERS menuconfig so that network drivers are grouped
together in its own menu entry under drivers, similar to most other
drivers.
This further has the advantages that `CONFIG_NET_DRIVERS` can be used
for testing to determine if network drivers has been selected.
This changed revealed a dependency loop where both `select` (for SLIP)
and `depends` (for PPP) which both depends on NET_DRIVERS` where in use
in the dependency tree for Qemu networking, especially NET_SLIP_TAP.
This is handled by defaulting `NET_DRIVERS` to `y` when building for a
Qemu target.
`SLIP` had a dependency to `!QEMU_TARGET || NET_QEMU_SLIP`. This is
changed so that SLIP prompt depends on `!QEMU_TARGET` which provides
full user control in hardware but makes the symbol promptless on Qemu
targets.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Adjust the test thread priority so that the test / IP stack
has a chance to run and the test passes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
TCP2 uses slightly more network packets and connections in the
socket poll test, so increase the values for the test.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Unit test code requires IPv6 to be ready. Select
CONFIG_NET_CONFIG_NEED_IPV6=y to ensure that.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
... because it is (required).
This makes a difference when building with CMake and forgetting
ZEPHYR_BASE or not registering Zephyr in the CMake package registry.
In this particular case, REQUIRED turns this harmless looking log
statement:
-- Could NOT find Zephyr (missing: Zephyr_DIR)
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- ...
-- ...
-- ...
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (target_sources):
Cannot specify sources for target "app" which is not built by
this project.
... into this louder, clearer, faster and (last but not least) final
error:
CMake Error at CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "Zephyr" with
any of the following names:
ZephyrConfig.cmake
zephyr-config.cmake
Add the installation prefix of "Zephyr" to CMAKE_PREFIX_PATH or set
"Zephyr_DIR" to a directory containing one of the above files. If
"Zephyr" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred!
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Using find_package to locate Zephyr.
Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.
Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.
It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The test name did not reflect the purpose of the test.
Also add "poll" tag so that we can more easily launch just
this test.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
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>
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>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As written originally, the tests assumed that if k_uptime_get_32()
returns times in milliseconds, that it also has millisecond
resolution. That however doesn't have to be the case, and indeed,
default timer interrupt period used by Zephyr is 10ms, and so system
time is incremented in such units. So, instead of "<= 1" tests to
account for timing increment, use "<= FUZZ".
For blocking tests, increase the timeout from previously used 10ms,
so we can reliably tests delays under the conditions described.
Also, enable CONFIG_QEMU_TICKLESS_WORKAROUND. Most other
timing-related tests have this enabled, and it may affect
stability of QEMU testing too.
Fixes: #12994
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Basic test for poll() behavior. UDP sockets are used for simplicity
so far (poll-related paths for UDP and TCP are similar, though later
adding TCP explicitly for full coverage may be useful).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>