• Petr Machata's avatar
    selftests: mlxsw: resource_scale: Introduce traffic tests · 3128b9f5
    Petr Machata authored
    The scale tests are currently testing two things: that some number of
    instances of a given resource can actually be created; and that when an
    attempt is made to create more than the supported amount, the failures are
    noted and handled gracefully.
    
    However the ability to allocate the resource does not mean that the
    resource actually works when passing traffic. For that, make it possible
    for a given scale to also test traffic.
    
    Traffic test is only run on the positive leg of the scale test (no point
    trying to pass traffic when the expected outcome is that the resource will
    not be allocated). Traffic tests are opt-in, if a given test does not
    expose it, it is not run.
    
    To this end, delay the test cleanup until after the traffic test is run.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3128b9f5
resource_scale.sh 1.45 KB