X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhttpd-corner.t;h=5efb9d14e80a50f45b5b3326ee90d391241a4e2e;hb=3eb26fe04dae68612c841e749abd2848ce78ae59;hp=1cfc2565c09fd3c3aa7056cd50473ffef5f77ce8;hpb=0b84d8600368c67080e683e415f7e502a343316b;p=public-inbox.git diff --git a/t/httpd-corner.t b/t/httpd-corner.t index 1cfc2565..5efb9d14 100644 --- a/t/httpd-corner.t +++ b/t/httpd-corner.t @@ -28,14 +28,7 @@ my $err = "$tmpdir/stderr.log"; my $out = "$tmpdir/stdout.log"; my $httpd = 'blib/script/public-inbox-httpd'; my $psgi = "./t/httpd-corner.psgi"; -my %opts = ( - LocalAddr => '127.0.0.1', - ReuseAddr => 1, - Proto => 'tcp', - Type => SOCK_STREAM, - Listen => 1024, -); -my $sock = IO::Socket::INET->new(%opts); +my $sock = tcp_server(); # Make sure we don't clobber socket options set by systemd or similar # using socket activation: @@ -56,11 +49,7 @@ if ($^O eq 'linux') { } my $upath = "$tmpdir/s"; -my $unix = IO::Socket::UNIX->new( - Listen => 1024, - Type => SOCK_STREAM, - Local => $upath -); +my $unix = unix_server($upath); ok($unix, 'UNIX socket created'); my $pid; END { kill 'TERM', $pid if defined $pid };