• Petr Machata's avatar
    selftests: net: fib_nexthops: Wait before checking reported idle time · b69c9946
    Petr Machata authored
    The purpose of this test is to verify that after a short activity passes,
    the reported time is reasonable: not zero (which could be reported by
    mistake), and not something outrageous (which would be indicative of an
    issue in used units).
    
    However, the idle time is reported in units of clock_t, or hundredths of
    second. If the initial sequence of commands is very quick, it is possible
    that the idle time is reported as just flat-out zero. When this test was
    recently enabled in our nightly regression, we started seeing spurious
    failures for exactly this reason.
    
    Therefore buffer the delay leading up to the test with a sleep, to make
    sure there is no legitimate way of reporting 0.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b69c9946
fib_nexthops.sh 64.7 KB