HomeFreeBSD

pf tests: Simplify handling of pfctl -s

Description

pf tests: Simplify handling of pfctl -s

Some pf tests check the output of pfctl -s[sSr] to find if relevant
states, source nodes or rules exist and if their counters have proper
values. The output is multiple lines per entry and contains varying
amount of whitespace. This makes parsing it rather hard.

Provide a function for standardization of output of pfctl -s[sSr] which
converts the output to a single line per entry and reduces whitespace
always to a single space. Adjust existing tests to make use of this
function.

Revieved by: kp
Approved by: kp (mentor)
Differental Revision: https://reviews.freebsd.org/D47435

Details

Provenance
vegeta_tuxpowered.netAuthored on Tue, Nov 12, 5:17 PM
Parents
rG452e6f549cdb: pf: Merge pf_clear_srcnodes() and pf_kill_srcnodes()
Branches
Unknown
Tags
Unknown