Skip to content
Commit 08d1bb2c authored by Robert Lubos's avatar Robert Lubos Committed by Carles Cufí
Browse files

tests: net: checksum_offload: Cleanup and fixes for the test suite



When working on new test cases for checksum_offload test suite it turned
out that some existing test cases were already broken and not testing
what expected. This commit fixes the broken functionality:
  * Despite having two separate interfaces for offloaded and
    non-offloaded checksum scenario, all packets ended up in a single
    interface anyway due to src address matching. Therefore use
    different destination address, depending on tests.
  * Add separate semaphores for offloaded and non-offloaded case, to
    ensure that the packet ended up on the correct interface.
  * The packet loopback in RX cases was broken, the LL address, IP
    address and UDP port swap written data in wrong places.
  * The receive path was not tested in the offloaded case.

Additionally, do a small cleanup before adding more tests:
  * Fix net_context leak.
  * Configure IPv6 neighbor once, during setup.
  * Add before function to cleanup the flags before tests execute.
  * Split tests into separate test cases, as they're not really
    dependent on each other.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent b12785f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment