From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 80AC91F8C8; Mon, 27 Sep 2021 18:35:36 +0000 (UTC) Date: Mon, 27 Sep 2021 13:35:36 -0500 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: [PATCH] t/cmd_ipc: allow extra errors and add diagnostics Message-ID: <20210927183536.GA2917@dcvr> References: <20210927124056.kj5okiefvs4ztk27@meerkat.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210927124056.kj5okiefvs4ztk27@meerkat.local> List-Id: Konstantin Ryabitsev wrote: > t/cmd_ipc.t .................. 29/? > # Failed test 'got EMSGSIZE' > # at t/cmd_ipc.t line 108. > # Looks like you failed 1 test of 42. > t/cmd_ipc.t .................. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/42 subtests > (less 13 skipped subtests: 28 okay) I think this is either caused by too much RAM and/or /proc/sys/net/core/wmem_* being larger-than-expected (both default to 212992 for me). This fixes failures when I set both wmem_max and wmem_default to 2129920 (10x its default value). -------------8<----------- Subject: [PATCH] t/cmd_ipc: allow extra errors and add diagnostics Apparently, sendmsg can fail in less common ways when network buffers are gigantic. Add some diagnostics for future failures, as well. Link: https://public-inbox.org/meta/20210927124056.kj5okiefvs4ztk27@meerkat.local/ --- t/cmd_ipc.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/cmd_ipc.t b/t/cmd_ipc.t index c5e715a1cd8a..dd90fa2a63e4 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; } }