about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-27 13:35:36 -0500
committerEric Wong <e@80x24.org>2021-09-27 21:07:40 +0000
commit0858ae1ccf6cb55d771cdd7d3ef0cf9a933a7876 (patch)
tree6af2503ac514c2d640773a4e1084239bca04c6fc /t
parent6fff67e676c85aecd26750bd0e02938aa4c2e6dd (diff)
downloadpublic-inbox-0858ae1ccf6cb55d771cdd7d3ef0cf9a933a7876.tar.gz
Apparently, sendmsg can fail in less common ways when
network buffers are gigantic.  Add some diagnostics for
future failures, as well.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://public-inbox.org/meta/20210927124056.kj5okiefvs4ztk27@meerkat.local/
Diffstat (limited to 't')
-rw-r--r--t/cmd_ipc.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/cmd_ipc.t b/t/cmd_ipc.t
index c5e715a1..dd90fa2a 100644
--- a/t/cmd_ipc.t
+++ b/t/cmd_ipc.t
@@ -85,7 +85,9 @@ my $do_test = sub { SKIP: {
                         $nsent += $n;
                         fail "sent 0 bytes" if $n == 0;
                 }
-                ok($!{EAGAIN}, "hit EAGAIN on send $desc");
+                ok($!{EAGAIN} || $!{ETOOMANYREFS},
+                        "hit EAGAIN || ETOOMANYREFS on send $desc") or
+                        diag "send failed with: $!";
                 ok($nsent > 0, 'sent some bytes');
 
                 socketpair($s1, $s2, AF_UNIX, $type, 0) or BAIL_OUT $!;
@@ -105,8 +107,9 @@ my $do_test = sub { SKIP: {
                                 diag "sent $nr, retrying with more";
                                 $nr += 2 * 1024 * 1024;
                         } else {
-                                ok($!{EMSGSIZE}, 'got EMSGSIZE');
-                                # diag "$nr bytes hits EMSGSIZE";
+                                ok($!{EMSGSIZE} || $!{ENOBUFS},
+                                        'got EMSGSIZE or ENOBUFS') or
+                                        diag "$nr bytes fails with: $!";
                                 last;
                         }
                 }