Re: [nft PATCH] tests: shell: Stabilize sets/reset_command_0 test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2023 at 11:54:04AM +0200, Phil Sutter wrote:
> Timeout/expiry value testing based on seconds is way too fragile,
> especially with slow debug kernels. Rewrite the unit to test
> minute-based values. This means it is no longer feasible to wait for
> values to sufficiently change, so instead specify an 'expires' value
> when creating the ruleset and drop the 'sleep' call.
> 
> While being at it:
> 
> - Combine 'get element' and 'reset element' calls into one, assert the
>   relevant (sanitized) line appears twice in output instead of comparing
>   with 'diff'.
> - Turn comments into 'echo' calls to help debugging if the test fails.
> 
> Reported-by: Florian Westphal <fw@xxxxxxxxx>
> Signed-off-by: Phil Sutter <phil@xxxxxx>

Patch applied.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux