pf tests: log additional information when a test ends
Log information from the running jails (routing, interfaces and pf) as well as interfaces on the host. This information is expected to be useful in debugging test failures. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
8f19f3d31a
commit
4826406b30
@ -28,8 +28,39 @@
|
||||
|
||||
. $(atf_get_srcdir)/../../common/vnet.subr
|
||||
|
||||
pft_onerror()
|
||||
{
|
||||
status=$?
|
||||
|
||||
echo "Debug log."
|
||||
echo "=========="
|
||||
echo "Test exit status: $?"
|
||||
echo
|
||||
|
||||
if [ -f created_jails.lst ]; then
|
||||
for jailname in `cat created_jails.lst`
|
||||
do
|
||||
echo "Jail ${jailname}"
|
||||
echo "----------------"
|
||||
jexec ${jailname} ifconfig
|
||||
jexec ${jailname} netstat -rn
|
||||
jexec ${jailname} pfctl -sa -v
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Created interfaces:"
|
||||
echo "-------------------"
|
||||
cat created_interfaces.lst
|
||||
|
||||
echo "Host interfaces:"
|
||||
echo "----------------"
|
||||
ifconfig
|
||||
}
|
||||
|
||||
pft_init()
|
||||
{
|
||||
trap pft_onerror EXIT
|
||||
|
||||
vnet_init
|
||||
|
||||
if [ ! -c /dev/pf ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user