mbox series

[ipset,0/4] Some testsuite improvements

Message ID 20230307135812.25993-1-phil@nwl.cc
Headers show
Series Some testsuite improvements | expand

Message

Phil Sutter March 7, 2023, 1:58 p.m. UTC
Patch 1 fixes the reason why xlate testuite failed for me - it was
simply not testing the right binary. Make it adhere to what the regular
testsuite does by calling the built ipset tool instead of the installed
one.

Patch 2 is just bonus, the idea for it came from a "does this even work"
sanity check while debugging the above.

Patch 3 fixes for missing 'netmask' tool on my system. Not entirely
satisfying though, there's no 'sendip', either (but the testsuite may
run without).

Patch 4 avoids a spurious testsuite failure for me. Not sure if it's a
good solution or will just move the spurious failure to others' systems.

Phil Sutter (4):
  tests: xlate: Test built binary by default
  tests: xlate: Make test input valid
  tests: cidr.sh: Add ipcalc fallback
  tests: hash:ip,port.t: 'vrrp' is printed as 'carp'

 tests/cidr.sh               | 32 ++++++++++++++++++++++++++++----
 tests/hash:ip,port.t.list2  |  2 +-
 tests/xlate/ipset-translate |  1 +
 tests/xlate/runtest.sh      | 14 ++++++++++----
 tests/xlate/xlate.t         |  6 +++---
 tests/xlate/xlate.t.nft     |  4 ++--
 6 files changed, 45 insertions(+), 14 deletions(-)
 create mode 120000 tests/xlate/ipset-translate

Comments

Pablo Neira Ayuso March 10, 2023, 11:56 a.m. UTC | #1
On Tue, Mar 07, 2023 at 02:58:08PM +0100, Phil Sutter wrote:
> Patch 1 fixes the reason why xlate testuite failed for me - it was
> simply not testing the right binary. Make it adhere to what the regular
> testsuite does by calling the built ipset tool instead of the installed
> one.
> 
> Patch 2 is just bonus, the idea for it came from a "does this even work"
> sanity check while debugging the above.
> 
> Patch 3 fixes for missing 'netmask' tool on my system. Not entirely
> satisfying though, there's no 'sendip', either (but the testsuite may
> run without).
> 
> Patch 4 avoids a spurious testsuite failure for me. Not sure if it's a
> good solution or will just move the spurious failure to others' systems.

LGTM
Phil Sutter March 10, 2023, 12:19 p.m. UTC | #2
On Tue, Mar 07, 2023 at 02:58:08PM +0100, Phil Sutter wrote:
> Patch 1 fixes the reason why xlate testuite failed for me - it was
> simply not testing the right binary. Make it adhere to what the regular
> testsuite does by calling the built ipset tool instead of the installed
> one.
> 
> Patch 2 is just bonus, the idea for it came from a "does this even work"
> sanity check while debugging the above.
> 
> Patch 3 fixes for missing 'netmask' tool on my system. Not entirely
> satisfying though, there's no 'sendip', either (but the testsuite may
> run without).
> 
> Patch 4 avoids a spurious testsuite failure for me. Not sure if it's a
> good solution or will just move the spurious failure to others' systems.
> 
> Phil Sutter (4):
>   tests: xlate: Test built binary by default
>   tests: xlate: Make test input valid
>   tests: cidr.sh: Add ipcalc fallback
>   tests: hash:ip,port.t: 'vrrp' is printed as 'carp'

Series applied.