Skip to content

Commit 964e7fe

Browse files
committed
Tests: SIGPIPE handling in mail tests.
In contrast to http tests, mail tests generally do not try to handle SIGPIPE when writing to a socket, and instead rely on $SIG{PIPE} being set at the start of the test (see 96:ecff5407867c). Fixed some tests which don't do this.
1 parent 537660f commit 964e7fe

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

mail_capability.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use Test::Nginx::SMTP;
2525
select STDERR; $| = 1;
2626
select STDOUT; $| = 1;
2727

28+
local $SIG{PIPE} = 'IGNORE';
29+
2830
my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap pop3 smtp/)
2931
->has_daemon('openssl')->plan(17);
3032

mail_error_log.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ use Test::Nginx::IMAP;
2626
select STDERR; $| = 1;
2727
select STDOUT; $| = 1;
2828

29+
local $SIG{PIPE} = 'IGNORE';
30+
2931
plan(skip_all => 'win32') if $^O eq 'MSWin32';
3032

3133
my $t = Test::Nginx->new()->has(qw/mail imap http rewrite/);

mail_ssl.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ use Test::Nginx::SMTP;
2525
select STDERR; $| = 1;
2626
select STDOUT; $| = 1;
2727

28+
local $SIG{PIPE} = 'IGNORE';
29+
2830
eval {
2931
require Net::SSLeay;
3032
Net::SSLeay::load_error_strings();

mail_ssl_conf_command.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ use Test::Nginx;
2222
select STDERR; $| = 1;
2323
select STDOUT; $| = 1;
2424

25+
local $SIG{PIPE} = 'IGNORE';
26+
2527
eval {
2628
require Net::SSLeay;
2729
Net::SSLeay::load_error_strings();

mail_ssl_session_reuse.t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ use Test::Nginx;
2323
select STDERR; $| = 1;
2424
select STDOUT; $| = 1;
2525

26+
local $SIG{PIPE} = 'IGNORE';
27+
2628
eval {
2729
require Net::SSLeay;
2830
Net::SSLeay::load_error_strings();

0 commit comments

Comments
 (0)