diff options
author | Phil Sutter <phil@nwl.cc> | 2022-09-30 18:15:59 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2022-10-26 20:11:42 +0200 |
commit | 0e80cfea3762b6680051e2b23ed69a493c762aa4 (patch) | |
tree | 79907a71d31bed934979830feef523606669b477 /include/libiptc/libiptc.h | |
parent | 1b7c6ffd808b05f362445f3a0a6dde5d7c217caf (diff) |
tests: iptables-test: Implement fast test mode
Implement a faster mode of operation for suitable test files:
1) Collect all rules to add and all expected output in lists
2) Any supposedly failing rules are checked immediately like in slow
mode.
3) Create and load iptables-restore input from the list in (1)
5) Construct the expected iptables-save output from (1) and check it in
a single search
5) If any of the steps above fail, fall back to slow mode for
verification and detailed error analysis. Fast mode failures are not
fatal, merely warn about them.
To keep things simple (and feasible), avoid complicated test files
involving external commands, multiple tables or variant-specific
results.
Aside from speeding up testsuite run-time, rule searching has become
more strict since EOL char is practically part of the search string.
This revealed many false positives where the expected string was
actually a substring of the printed rule.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include/libiptc/libiptc.h')
0 files changed, 0 insertions, 0 deletions