pf tests: Only do post-test logging when specifically enabled

The pf tests have the ability to log state information (pf rules, pf
states, interfaces, ...) on exit (i.e. on success or on error).
This is useful, but only in specific cases. When it's not needed it may
get in the way of clear output.

Test scripts can add 'debug' to the pft_init call to enable this for the
specified test.

Reviewed by:	brd
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D34133
This commit is contained in:
Kristof Provost 2022-02-01 18:33:42 +01:00
parent 1094189965
commit 34478b73bf

View File

@ -59,7 +59,10 @@ pft_onerror()
pft_init()
{
trap pft_onerror EXIT
if [ "$1" == "debug" ]
then
trap pft_onerror EXIT
fi
vnet_init