Datagrams should either be fully sent or not sent at all if networking
buffers or network interface MTU does not allow that.
Verify that by trying to send MTU+1 bytes in case of IPv4 (as IP level
fragmentation is not implemented) and IPv6 (should fail when IPv6
fragmentation support is not enabled and succeed otherwise). In case of
IPv6 try to send "total number of network buffers + 1", so that even with
IPv6 fragmentation enabled requested datagram will not be sent. In all
tested cases when datagram is too big, check that ENOMEM error code is set.
NOTE: Tested behavior is not 100% compliant with Linux, as on Linux
EMSGSIZE error code is set when trying to send datagram bigger than MTU,
when manually disabling IP fragmentation (by setting IP_MTU_DISCOVER to
IP_PMTUDISC_DO). However, it is not trivial to implement such
behavior (EMSGSIZE error due to MTU) now and there is always a risk of
running out of buffers (and getting ENOMEM), so for now implemented tests
just assume the latter case to always happen.
Add 3rd testcase, which enables IPv6 fragmentation support, so that UDP
socket behavior can be tested in that context.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
some tests configured with CONFIG_NEWLIB_LIBC=y,
it's better to add a filter filter: TOOLCHAIN_HAS_NEWLIB == 1
in those tests yaml file.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
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>
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>
Run networking tests for native_posix, qemu_x86 and qemu_cortex_m3
platforms only as the tests are generic enough so no need to run
them in real physical device.
Fixes#9623#9614#9622#9621#9618
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Relies on loopback network interface added recently and being able
to run QEMU without connecting to host networking.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
A number of the network tests have minimal memory requirements that not
all boards are able to meet. Add in those memory requirements so we
don't attempt to build these tests for those platforms. Utilized the
frdm_kl25z (with 16K of memory) and cc2650_sensortag (with 20K) to test
the limits.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Instead of only running net tests in qemu_x86, enable those
tests in all suitable platforms. The tests are disabled for
bbc_microbit as that platform does not have enough memory.
The tests/net/arp and tests/net/ieee802154/l2 are disabled
for qemu_xtensa as the qemu crashed when running the tests.
For tests/net/all there was a weird build error for qemu_xtensa
so that test is also disabled for that platform.
Increased the trickle timeout to 3 secs in tests/net/trickle as
occacionally there was timeout error in qemu_cortex_m3 when the
test was run.
Jira: ZEP-2398
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>