https://bugs.dpdk.org/show_bug.cgi?id=2016

            Bug ID: 2016
           Summary: memif: no connectivity or negative tests
           Product: DPDK
           Version: 26.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 366
  --> https://bugs.dpdk.org/attachment.cgi?id=366&action=edit
memif test script

memif has no test in CI. Nothing checks that a server and a client can
connect and forward traffic, and nothing checks that a malformed peer is
rejected rather than crashing or corrupting the server.

The driver takes its input from another process over shared memory, so
the second of those matters more here than it would for a NIC driver.

Two pieces of work, which can be separate patches:

1. Connectivity baseline

A black box test that launches a memif server and a memif client as two
testpmd processes connected over a shared socket, and checks that
traffic flows in both directions. This exercises the connection path
over a real link without depending on any internal driver API, and gives
a two-instance harness that an adversarial peer can be driven from
later. Skipping with exit 77 when fewer than four cores are online keeps
it usable in constrained CI, since two primary processes need two cores
each.

A candidate script is attached. Two things to settle before it lands:

  - It greps the logs for a "bad descriptor" line that nothing currently
    emits. That log only exists once descriptor validation is added, so
    the check is either premature or should be dropped.
  - It assumes the server and client must be separate processes. Worth
    checking whether a server vdev and a client vdev can be instantiated
    in a single testpmd process. If they can, the whole thing becomes a
    plain unit test with no core requirement and no process
    orchestration.

2. Negative test

A standalone client that speaks the control protocol over the socket
directly and sends malformed messages, asserting that the server
disconnects cleanly and does not crash. Written that way it needs no VPP
dependency and no second DPDK process, and it can cover every
control-channel case: wrong-direction messages, oversized rings, rings
outside their region, repeated ring indices, regions whose fd is smaller
than the claimed size.

The negative test is the more valuable of the two, and it is the natural
place for a fuzz driver to be attached later.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to