Skip to content

Commit

Permalink
Pass MALLOC_OPTIONS to pfresolved in regress.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Dec 4, 2023
1 parent 5de1ae1 commit 72713f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion regress/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ PERLPATH = ${.CURDIR}/

.for a in ${ARGS}
run-$a: $a
time SUDO=${SUDO} KTRACE=${KTRACE} PFRESOLVED=${PFRESOLVED} \
time SUDO=${SUDO} MALLOC_OPTIONS=${MALLOC_OPTIONS} KTRACE=${KTRACE} \
PFRESOLVED=${PFRESOLVED} \
perl ${PERLINC} ${PERLPATH}pfresolved.pl ${PERLPATH}$a
.endfor

Expand Down
7 changes: 6 additions & 1 deletion regress/Pfresolved.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ sub child {
}
print STDERR "pfresolved not running\n";

my @env;
if ($ENV{MALLOC_OPTIONS}) {
@env = "env" if $ENV{SUDO};
push @env, "MALLOC_OPTIONS=$ENV{MALLOC_OPTIONS}";
}
my @ktrace;
@ktrace = ($self->{ktraceexec}, "-i", "-f", $self->{ktracefile})
if $self->{ktraceexec};
Expand All @@ -74,7 +79,7 @@ sub child {
$resolver .= '@'.$self->{port} if $self->{port};
my $hostname = $self->{hostname} || "localhost";
$resolver .= "#$hostname" if $self->{tls};
my @cmd = (@sudo, @ktrace, $self->{execfile}, "-dvvv",
my @cmd = (@sudo, @env, @ktrace, $self->{execfile}, "-dvvv",
"-f", $self->{conffile});
push @cmd, "-r", $resolver if $resolver;
push @cmd, "-m", $self->{min_ttl} if $self->{min_ttl};
Expand Down

0 comments on commit 72713f1

Please sign in to comment.