From ce572cc9a585c373df9714dc3c5a6c94cdb99d86 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 1 Oct 2014 11:33:19 +1000
Subject: TODO checking the result of recv() on hurd

Bug: https://rt.perl.org/Public/Bug/Display.html?id=122657
Bug-Debian: https://bugs.debian.org/758718
Patch-Name: fixes/hurd_socket_recv_todo.diff
---
 t/io/socket.t | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/t/io/socket.t b/t/io/socket.t
index 345d196b9c..b51079a4a5 100644
--- a/t/io/socket.t
+++ b/t/io/socket.t
@@ -101,9 +101,15 @@ SKIP: {
 
 	    my $buf;
 	    my $recv_peer = recv($child, $buf, 1000, 0);
-	    # [perl #118843]
-	    ok_child($recv_peer eq '' || $recv_peer eq getpeername $child,
-	       "peer from recv() should be empty or the remote name");
+	    {
+		use vars '$TODO';
+		local $TODO;
+		$TODO = "[perl #122657] Hurd doesn't populate sin_len correctly"
+		    if $^O eq "gnu";
+		# [perl #118843]
+		ok_child($recv_peer eq '' || $recv_peer eq getpeername $child,
+			 "peer from recv() should be empty or the remote name");
+	    }
 	    while(defined recv($child, my $tmp, 1000, 0)) {
 		last if length $tmp == 0;
 		$buf .= $tmp;
@@ -127,7 +133,8 @@ done_testing();
 my @child_tests;
 sub ok_child {
     my ($ok, $note) = @_;
-    push @child_tests, ( $ok ? "ok " : "not ok ") . curr_test() . " - $note\n";
+    push @child_tests, ( $ok ? "ok " : "not ok ") . curr_test() . " - $note "
+	. ( $TODO ? "# TODO $TODO" : "" ) . "\n";
     curr_test(curr_test()+1);
 }
 
