Commit graph

17 commits

Author SHA1 Message Date
Robert Lubos adc8fd8bbc tests: net: mld: Add more test cases involving iface state changes
Add more test cases verifying that MLD events/reports are sent
accordingly when interface state changes.

Introduce separate semaphores for waiting for network events, as having
a single one for transmit and events is ambiguous in tests.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-20 14:26:24 +03:00
Konrad Derda d60ea3efee tests: net: mld: add tests for multicast routes in MLDv2 reports
This commit introduces a new test case for veryfing that addition and
deletion of multicast routing entries emit MLDv2 reports when needed
and if multicast routing entries are appended to MLDv2 records properly.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-05-06 22:50:01 +01:00
Konrad Derda d4dc516119 tests: net: mld: fix waiting for MLDv2 report after query
This commit fixes 'test_verify_send_report()' function as it was
not properly waiting for a MLDv2 report after sending a query. The
asserted value was set for the previous report sent after joining a
group.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-04-03 15:30:03 -05:00
Jukka Rissanen 0bc1423335 tests: net: mld: Add socket based join/leave tests
Make sure the IPV6_ADD_MEMBERSHIP and IPV4_DROP_MEMBERSHIP
work as expected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2023-12-04 16:38:49 +00:00
Anas Nashif 345735d0a8 tests: remove CONFIG_ZTEST_NEW_API in all tests
Remove all usage of CONFIG_ZTEST_NEW_API from tests and sample as this
is now enabled by default.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:04:29 +02:00
Hu Zhenyu 29b419b8bc test: Update the new ZTEST APIs tests/net/mld
TEST=twister -T tests/net/mld

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-07-08 10:58:24 +02:00
Jukka Rissanen 6e1df0d603 tests: net: Refactor tests when running in real hw
The network tests were expecting that network interfaces
are in certain order. As we cannot guarantee that, refactor
the tests like this:

* if test is using DUMMY L2 driver, then disable Ethernet L2
  and fetch only DUMMY L2 instead of default interface
* if test is using Ethernet L2 driver, then make sure that the
  test is using the Ethernet interface specified in the test
  instead of the one provided by the DUT

Fixes #34505

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-30 11:59:10 +03:00
Jukka Rissanen ac56fd8d27 tests: net: Increase stack sizes for coverage testing
We need to increase the stack sizes if user enables CONFIG_COVERAGE
option. You can test this by this command

    sanitycheck --coverage -p qemu_x86 -T tests/net/udp \
                -T tests/net/mgmt  -T tests/net/mld

This is partial fix for issues described in #17323

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-07-04 09:42:44 -07:00
Jukka Rissanen f3f04bf9eb tests: net: Convert to new logging system
Use new logging system with support for network log level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-10-04 14:13:57 +03:00
Jukka Rissanen c609bd8fd7 tests: net: Increase the size of main stack
This avoids this crashing in qemu_x86

***** Stack Check Fail! *****
Current thread ID = 0x004015e0
Faulting segment:address = 0x0008:0x00003593
eax: 0x0041e930, ebx: 0x00000000, ecx: 0x004170bc, edx: 0x0000dff8
esi: 0xffffffff, edi: 0x0041e930, ebp: 0x00417010, esp: 0x00416ffc
eflags: 0x216
Fatal fault in essential thread! Spinning...
Terminate emulator due to fatal kernel error

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-03-27 10:06:54 -04:00
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Anas Nashif ca0ad13a61 net: enable SLIP only on QEMU targets
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>
2017-07-26 10:57:48 -04:00
Jukka Rissanen dcbe20dcb0 tests: net: mld: Fix tests and run them automatically
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>
2017-06-21 21:38:12 -04:00
Tomasz Bursztyka bf964cdd4c net: Renaming net nbuf API to net pkt API
There have been long lasting confusion between net_buf and net_nbuf.
While the first is actually a buffer, the second one is not. It's a
network buffer descriptor. More precisely it provides meta data about a
network packet, and holds the chain of buffer fragments made of net_buf.

Thus renaming net_nbuf to net_pkt and all names around it as well
(function, Kconfig option, ..).

Though net_pkt if the new name, it still inherit its logic from net_buf.
'
This patch is the first of a serie that will separate completely net_pkt
from net_buf.

Change-Id: Iecb32d2a0d8f4647692e5328e54b5c35454194cd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 14:19:50 +03:00
Jukka Rissanen e82f7a6a31 tests: net: Check allnodes and solicit node addresses.
Make sure that the network interface has proper allnodes and
solicit node multicast addresses set.

Change-Id: I2318d63df0b5d09dfaa8347b69c843b84ed63f4b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:48 +02:00
Jukka Rissanen 253e9a377f tests: net: Add MLD query tests
Add tests for verifying that we can receive Multicast Listener
Discovery query and act on it.

Change-Id: I926cf5e9f77cd250d2d7094f2379e320ef163540
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:48 +02:00
Jukka Rissanen d0fc787c21 tests: net: Add unit tests for mld
MLD (Multicast Listerer Discovery) unit tests when joining
or leaving an IPv6 multicast group.

Change-Id: I7cd0f4c5f31c693d816fb5d27d3d23bb27679c35
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-09 20:33:48 +02:00