From: Eric Wong Date: Fri, 28 Apr 2023 01:08:19 +0000 (+0000) Subject: t/gzip_filter: enhance diagnostics on missing SIGPIPE X-Git-Tag: v2.0.0~1163 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c791fd9ecc60b7bd6f41b18f928279f8df5cc733;p=thirdparty%2Fpublic-inbox.git t/gzip_filter: enhance diagnostics on missing SIGPIPE I encountered this SIGPIPE test not working as intended on FreeBSD 12.4 once (out of hundreds of runs); but can't reproduce it... --- diff --git a/t/gzip_filter.t b/t/gzip_filter.t index b349ae58c..97eac2d04 100644 --- a/t/gzip_filter.t +++ b/t/gzip_filter.t @@ -1,7 +1,7 @@ -# Copyright (C) 2020-2021 all contributors +#!perl -w +# Copyright (C) all contributors # License: AGPL-3.0+ -use strict; -use Test::More; +use v5.12; use IO::Handle (); # autoflush use Fcntl qw(SEEK_SET); use PublicInbox::TestCommon; @@ -31,7 +31,7 @@ require_ok 'PublicInbox::GzipFilter'; open my $fh, '<', 'COPYING' or die "open(COPYING): $!"; my $buf = do { local $/; <$fh> }; while ($filter->write($buf .= rand)) {} - ok($sigpipe, 'got SIGPIPE'); + ok($sigpipe, 'got SIGPIPE') or diag "\$!=$!"; close $w; } done_testing;