mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-04 16:45:24 +00:00
Merge branch '4513-system-tests-fail-with-net-dns-1-42' into 'main'
Resolve "System tests fail with Net::DNS 1.42" Closes #4513 See merge request isc-projects/bind9!8615
This commit is contained in:
@@ -22,9 +22,14 @@ my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
|
|||||||
print $pidf "$$\n" or die "cannot write pid file: $!";
|
print $pidf "$$\n" or die "cannot write pid file: $!";
|
||||||
$pidf->close or die "cannot close pid file: $!";
|
$pidf->close or die "cannot close pid file: $!";
|
||||||
sub rmpid { unlink "ans.pid"; exit 1; };
|
sub rmpid { unlink "ans.pid"; exit 1; };
|
||||||
|
sub term { };
|
||||||
|
|
||||||
$SIG{INT} = \&rmpid;
|
$SIG{INT} = \&rmpid;
|
||||||
$SIG{TERM} = \&rmpid;
|
if ($Net::DNS::VERSION > 1.41) {
|
||||||
|
$SIG{TERM} = \&term;
|
||||||
|
} else {
|
||||||
|
$SIG{TERM} = \&rmpid;
|
||||||
|
}
|
||||||
|
|
||||||
my $localaddr = "10.53.0.3";
|
my $localaddr = "10.53.0.3";
|
||||||
|
|
||||||
@@ -128,4 +133,11 @@ my $ns = Net::DNS::Nameserver->new(
|
|||||||
Verbose => $verbose,
|
Verbose => $verbose,
|
||||||
);
|
);
|
||||||
|
|
||||||
$ns->main_loop;
|
if ($Net::DNS::VERSION >= 1.42) {
|
||||||
|
$ns->start_server();
|
||||||
|
select(undef, undef, undef, undef);
|
||||||
|
$ns->stop_server();
|
||||||
|
unlink "ans.pid";
|
||||||
|
} else {
|
||||||
|
$ns->main_loop;
|
||||||
|
}
|
||||||
|
@@ -22,9 +22,14 @@ my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
|
|||||||
print $pidf "$$\n" or die "cannot write pid file: $!";
|
print $pidf "$$\n" or die "cannot write pid file: $!";
|
||||||
$pidf->close or die "cannot close pid file: $!";
|
$pidf->close or die "cannot close pid file: $!";
|
||||||
sub rmpid { unlink "ans.pid"; exit 1; };
|
sub rmpid { unlink "ans.pid"; exit 1; };
|
||||||
|
sub term { };
|
||||||
|
|
||||||
$SIG{INT} = \&rmpid;
|
$SIG{INT} = \&rmpid;
|
||||||
$SIG{TERM} = \&rmpid;
|
if ($Net::DNS::VERSION >= 1.42) {
|
||||||
|
$SIG{TERM} = \&term;
|
||||||
|
} else {
|
||||||
|
$SIG{TERM} = \&rmpid;
|
||||||
|
}
|
||||||
|
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
|
|
||||||
@@ -73,4 +78,11 @@ my $ns = Net::DNS::Nameserver->new(
|
|||||||
Verbose => $verbose,
|
Verbose => $verbose,
|
||||||
);
|
);
|
||||||
|
|
||||||
$ns->main_loop;
|
if ($Net::DNS::VERSION >= 1.42) {
|
||||||
|
$ns->start_server();
|
||||||
|
select(undef, undef, undef, undef);
|
||||||
|
$ns->stop_server();
|
||||||
|
unlink "ans.pid";
|
||||||
|
} else {
|
||||||
|
$ns->main_loop;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user