Debian Codegraph @

debian/patches/hurd-postmaster-socket-send

raw
1 From b5638c1959308665486ca9241997d48cae1485eb Mon Sep 17 00:00:00 2001
2 From: Michael Banck <[email protected]>
3 Date: Fri, 13 Feb 2026 16:34:45 +0100
4 Subject: [PATCH v1] Add an additional check in raw_connect_works for the Hurd.
5
6 The function raw_connect_works() tests whether raw sockets work for the
7 postmaster TAP tests. While creating the socket does work on the Hurd,
8 the TAP test does a subsequent send() on it which fails on the Hurd with
9 "Cannot determine peer address". To circumvent this, try a send() and
10 catch this error as well.
11 ---
12 src/test/perl/PostgreSQL/Test/Cluster.pm | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15 Index: postgresql/src/test/perl/PostgreSQL/Test/Cluster.pm
16 ===================================================================
17 --- postgresql.orig/src/test/perl/PostgreSQL/Test/Cluster.pm
18 +++ postgresql/src/test/perl/PostgreSQL/Test/Cluster.pm
19 @@ -353,9 +353,10 @@ sub raw_connect_works
20 {
21 eval {
22 my $sock = $self->raw_connect();
23 + $sock->send('foo');
24 $sock->close();
25 };
26 - if ($@ =~ /not implemented/)
27 + if ($@ =~ /not implemented/ or $@ =~ /Cannot determine peer address/)
28 {
29 diag "IO::Socket::UNIX does not work: $@";
30 return 0;