From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BBFA51F489 for ; Fri, 6 Oct 2023 09:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1696585618; bh=RhSi1oCt0NK6H66rsekLlOhbJbY7k7QtiprTU01/rvg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gn5NUAXlSKlMjsbO1AG5dmTPIcsVIZV4HNqF7tUFs4bg1bf72IUyCpPxH0MqrRU1Y pxDnpV4Tfj0gMkbPPNISH+vtpIu+Gky/u21jyqmcYCpv4MsdKFAL6Rgr+iFiiKpYwu Z1tkOv6QN62p2KjS9nSJ83fzaWYXtpNLnraFoeAw= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/5] t/dir_idle: dump event list on failure Date: Fri, 6 Oct 2023 09:46:03 +0000 Message-ID: <20231006094604.95809-5-e@80x24.org> In-Reply-To: <20231006094604.95809-1-e@80x24.org> References: <20231006094604.95809-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Hopefully this makes it easier to diagnose portability problems on new OSes we use. --- t/dir_idle.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/dir_idle.t b/t/dir_idle.t index bb6f47eb..02759b54 100644 --- a/t/dir_idle.t +++ b/t/dir_idle.t @@ -1,7 +1,7 @@ #!perl -w # Copyright (C) all contributors # License: AGPL-3.0+ -use v5.12; use strict; use PublicInbox::TestCommon; +use v5.12; use PublicInbox::TestCommon; use PublicInbox::DS qw(now); use File::Path qw(make_path); use_ok 'PublicInbox::DirIdle'; @@ -26,10 +26,12 @@ rmdir("$tmpdir/a") or xbail "rmdir $!"; @x = (); $end = 3 + now; PublicInbox::DS::event_loop(); -is(scalar(@x), 1, 'got an event') and +if (is(scalar(@x), 1, 'got an event after rmdir')) { is($x[0]->[0]->fullname, "$tmpdir/a", 'got expected fullname') and ok($x[0]->[0]->IN_DELETE_SELF, 'IN_DELETE_SELF set'); - +} else { + diag explain(\@x); +} rename("$tmpdir/c", "$tmpdir/j") or xbail "rmdir $!"; @x = (); $end = 3 + now;