Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass MALLOC_OPTIONS to pfresolved in regress. #39

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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