# HG changeset patch # User Maxim Dounin # Date 1684422419 -10800 # Node ID ce4a06d72256cd871a655cfa31aac44fc0d6ed89 # Parent b3bbde3f806d38c7599046f509c5f20048e81bd5 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. diff --git a/mail_capability.t b/mail_capability.t --- a/mail_capability.t +++ b/mail_capability.t @@ -25,6 +25,8 @@ use Test::Nginx::SMTP; select STDERR; $| = 1; select STDOUT; $| = 1; +local $SIG{PIPE} = 'IGNORE'; + my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap pop3 smtp/) ->has_daemon('openssl')->plan(17); diff --git a/mail_error_log.t b/mail_error_log.t --- a/mail_error_log.t +++ b/mail_error_log.t @@ -26,6 +26,8 @@ use Test::Nginx::IMAP; select STDERR; $| = 1; select STDOUT; $| = 1; +local $SIG{PIPE} = 'IGNORE'; + plan(skip_all => 'win32') if $^O eq 'MSWin32'; my $t = Test::Nginx->new()->has(qw/mail imap http rewrite/); diff --git a/mail_ssl.t b/mail_ssl.t --- a/mail_ssl.t +++ b/mail_ssl.t @@ -25,6 +25,8 @@ use Test::Nginx::SMTP; select STDERR; $| = 1; select STDOUT; $| = 1; +local $SIG{PIPE} = 'IGNORE'; + eval { require Net::SSLeay; Net::SSLeay::load_error_strings(); diff --git a/mail_ssl_conf_command.t b/mail_ssl_conf_command.t --- a/mail_ssl_conf_command.t +++ b/mail_ssl_conf_command.t @@ -22,6 +22,8 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; +local $SIG{PIPE} = 'IGNORE'; + eval { require Net::SSLeay; Net::SSLeay::load_error_strings(); diff --git a/mail_ssl_session_reuse.t b/mail_ssl_session_reuse.t --- a/mail_ssl_session_reuse.t +++ b/mail_ssl_session_reuse.t @@ -23,6 +23,8 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; +local $SIG{PIPE} = 'IGNORE'; + eval { require Net::SSLeay; Net::SSLeay::load_error_strings();