about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-03-05 22:42:16 +0000
committerEric Wong <e@80x24.org>2016-03-05 22:42:38 +0000
commit2ea979f43ec87547b7dfb74312a21062044d018a (patch)
tree0e655223dc6f4359f136c8fc7633630c6c1d7422 /t
parentbc5f141e8e4e4df3813dd123cf5a76355e65be17 (diff)
downloadpublic-inbox-2ea979f43ec87547b7dfb74312a21062044d018a.tar.gz
This means we can avoid false-positives when inheriting multiple
Unix domain sockets.
Diffstat (limited to 't')
-rw-r--r--t/httpd-unix.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/httpd-unix.t b/t/httpd-unix.t
index b3368491..13df676b 100644
--- a/t/httpd-unix.t
+++ b/t/httpd-unix.t
@@ -35,6 +35,14 @@ my $spawn_httpd = sub {
         ok(defined $pid, 'forked httpd process successfully');
 };
 
+{
+        require PublicInbox::Daemon;
+        my $l = "$tmpdir/named.sock";
+        my $s = IO::Socket::UNIX->new(Listen => 5, Local => $l,
+                                        Type => SOCK_STREAM);
+        is(PublicInbox::Daemon::sockname($s), $l, 'sockname works for UNIX');
+}
+
 ok(!-S $unix, 'UNIX socket does not exist, yet');
 $spawn_httpd->("-l$unix");
 for (1..1000) {