mirror of
git://git.proxmox.com/git/pve-firewall.git
synced 2025-03-06 00:58:15 +03:00
fwtester.pl: add warnings to trace
This commit is contained in:
parent
b5831a0de8
commit
4912485180
@ -37,6 +37,14 @@ sub add_trace {
|
||||
}
|
||||
}
|
||||
|
||||
$SIG{'__WARN__'} = sub {
|
||||
my $err = $@;
|
||||
my $t = $_[0];
|
||||
chomp $t;
|
||||
add_trace("$t\n");
|
||||
$@ = $err;
|
||||
};
|
||||
|
||||
sub nf_dev_match {
|
||||
my ($devre, $dev) = @_;
|
||||
|
||||
|
@ -39,6 +39,8 @@ sub run_tests {
|
||||
my ($ruleset, $ipset_ruleset) =
|
||||
PVE::Firewall::compile(undef, undef, $vmdata, 1);
|
||||
|
||||
print PVE::FirewallSimulator::get_trace() . "\n" if !$debug;
|
||||
|
||||
my $filename = "$testdir/$testfile";
|
||||
my $fh = IO::File->new($filename) ||
|
||||
die "unable to open '$filename' - $!\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user