From 5a08f9f120cea7cb525fc04b9ac6872eedd65af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=A4rdian?= Date: Mon, 8 Aug 2022 17:50:48 +0200 Subject: [PATCH] t/update_mirror.t: Ignore DIE signal inside eval blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The process will still be running and the error handled. See: https://www.perlmonks.org/?node_id=1173708 This leads to situations where the test server is stopped and tests failing, due to the "libregexp-ipv6-perl" not being installed in Debian/Ubuntu. It's caused by liburi-perl's detection of "Regexp::IPv6" by requiring it and catching the failure (DIE signal) in URI/_generic.pm:20. https://github.com/libwww-perl/URI/blob/master/lib/URI/_generic.pm#L20 Signed-off-by: Lukas Märdian --- t/update_mirror.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/update_mirror.t b/t/update_mirror.t index 7bd5a57..174cbca 100644 --- a/t/update_mirror.t +++ b/t/update_mirror.t @@ -24,7 +24,10 @@ my $pid = $server->background; ok( $pid, 'HTTP Server started' ); sleep 1; -$SIG{__DIE__} = sub { kill( 9, $pid ) }; +$SIG{__DIE__} = sub { + return if $^S; # ignore die in an eval block, while process is still running + kill( 9, $pid ) +}; my $mcpi = CPAN::Mini::Inject->new; $mcpi->parsecfg( 't/.mcpani/config' );