• Magnus Karlsson's avatar
    selftests: xsk: Introduce test specifications · ce74acaf
    Magnus Karlsson authored
    
    
    Introduce a test specification to be able to concisely describe a
    test. Currently, a test is implemented by sprinkling test specific if
    statements here and there, which is not scalable or easy to
    understand. The end goal with this patch set is to come to the point
    in which a test is completely specified by a test specification that
    can easily be constructed in a single function so that new tests can
    be added without too much trouble. This test specification will be run
    by a test runner that has no idea about tests. It just executes the
    what test specification states.
    
    This patch introduces the test specification and, as a start, puts the
    two interface objects in there, one containing the packet stream to be
    sent and the other one the packet stream that is supposed to be
    received for a test to pass. The global variables containing these can
    then be eliminated. The following patches will convert each existing
    test into a test specification and add the needed fields into it and
    the functionality in the test runner that act on the test
    specification. At the end, the test runner should contain no test
    specific code and each test should be described in a single simple
    function.
    Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Acked-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
    Link: https://lore.kernel.org/bpf/20210907071928.9750-4-magnus.karlsson@gmail.com
    ce74acaf
xdpxceiver.h 2.93 KB