]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/httpd-https.t
doc: TODO and release notes updates ahead of 1.6
[public-inbox.git] / t / httpd-https.t
index 265febe5ea843f7afb2691ab43657c1a5c8aafde..fcfa12afb04808740a8bd90ae9e5b490e19f22bb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
@@ -6,7 +6,7 @@ use Test::More;
 use Socket qw(SOCK_STREAM IPPROTO_TCP SOL_SOCKET);
 use PublicInbox::TestCommon;
 # IO::Poll is part of the standard library, but distros may split them off...
-require_mods(qw(IO::Socket::SSL IO::Poll));
+require_mods(qw(IO::Socket::SSL IO::Poll Plack::Util));
 my $cert = 'certs/server-cert.pem';
 my $key = 'certs/server-key.pem';
 unless (-r $key && -r $cert) {
@@ -87,7 +87,7 @@ for my $args (
 
        SKIP: {
                skip 'TCP_DEFER_ACCEPT is Linux-only', 2 if $^O ne 'linux';
-               my $var = Socket::TCP_DEFER_ACCEPT();
+               my $var = eval { Socket::TCP_DEFER_ACCEPT() } // 9;
                defined(my $x = getsockopt($https, IPPROTO_TCP, $var)) or die;
                ok(unpack('i', $x) > 0, 'TCP_DEFER_ACCEPT set on https');
        };