This patch convert net test cases to use ztest framework APIs
which makes output unified to other test cases.
Signed-off-by: Punit Vara <punit.vara@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file, reduced size to 1024
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- added CONFIG_ZTEST_STACKSIZE=320
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file, reduced size to 896
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file, reduced the size by half
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in config file, reduced size by half
JIRA: ZEP-2249
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.
Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This enables IPSP node role which requires IPSS GATT service to be
registered.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Use net app API since we want to enable MQTT with TLS.
mqtt_connect() and mqtt_close() are added to build and close the
connection to the broker. The caller doesn't need to deal with
the net context anymore and the most of network setup code in
mqtt_publisher is removed.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
This is a configuration that is unrealistic and used only to verify
Kconfig dependencies, trying to build this for every board fails due to
size limitations and due to unavailable device support on some of those
boards, building for qemu targets should be good enough.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.
Additionally, the TUN options is removed. This option was not used
anywhere.
To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Imax doublings value was too large which caused overflow
of Imax_abs value, which then could cause Trickle test to fail.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The majority of these fixes adjust the memory limit needed to build the
various tests on systems with and without BLE support. We also fixup
one test case that was able to run on platforms with 16k of memory.
Signed-off-by: Kumar Gala <kumar.gala@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>
According to RFC7959 page 30, "The end of a block-wise transfer is
governed by the M bits in the Block options, _not_ by exhausting the
size estimates exchanges."
Therefore, we should check the M bit instead of total size (which
is not always available, too)
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Some README files referenced wiki articles that have been
moved to the doc area on the website.
Fixes#668
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The sequence number validator was checking the seq numbers
incorrectly. This caused some valid RST packets to be dropped
and the TCP stream to hang.
Added also a TCP test case that tests the seq validator.
Jira: ZEP-2289
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
No need to set the main stack size as the test runs just fine
without it.
Jira: ZEP-2341
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The QEMU targets have plenty of RAM now and the current value
specified wasn't a multiple of a 4K page.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A network stack thread was trying to use a semaphore before it was
initialized. Set it up at toplevel so it is ready to go.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Remove NET_TCP_HDR() macro as we cannot safely access TCP header
via it if the network packet header spans over multiple net_buf
fragments.
Fixed also the TCP unit tests so that they pass correctly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove NET_UDP_HDR() macro as we cannot safely access UDP header
via it if the network packet header spans over multiple net_buf
fragments.
Fixed also the UDP unit tests so that they pass correctly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove NET_ICMP_HDR() macro as we cannot safely access ICMP header
via it if the network packet header spans over multiple net_buf
fragments.
Jira: ZEP-2306
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT should be used instead of
CONFIG_NET_IFACE_UNICAST_IPV6_ADDR_COUNT.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The test starts the last one: after the driver and the net stack.
However, the net stack (due to DAD and else) will already try to send
some packet, resulting it giving a uninitialized semaphore. But once
properly initialized, this semaphore will end up with a non-zero count
when the test will start: thus reseting it to 0 before running the
tests.
Jira: ZEP-2319
Reported-by Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Test whichever had Camel case defined for functions and variables have
been replaced.
Following warnings have been fixed in test cases as well.
- line over 80 characters
- Macros with flow control statements should be avoided
- Macros with complex values should be enclosed in parentheses
- break quoted strings at a space character
- do not add new typedefs
- Comparisons should place the constant on the right
side of the test
- suspect code indent for conditional statements
- Missing a blank line after declarations
- macros should not use a trailing semicolon
- Macros with multiple statements should be
enclosed in a do - while loop
- do not use C99 // comments
JIRA: ZEP-2249
Signed-off-by: Punit Vara <punit.vara@intel.com>
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It is confusing if we print timeout error when expecting
a timeout to happen. So for timeout test, do not print
an error message as the timeout is suppose to happen.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The TCP tests had several failures because of unnecessary
Kconfig options. These are now fixed and the TCP tests are
also run automatically by CI.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The MLD (Multicast Listener Discovery) tests had a failure.
This is now fixed and the MLD tests are also run automatically by CI.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>