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 27FB01F463; Thu, 19 Dec 2019 04:02:25 +0000 (UTC) Date: Thu, 19 Dec 2019 04:02:25 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 5/6] tests: move t/common.perl to PublicInbox::TestCommon Message-ID: <20191219040225.GA23827@dcvr> References: <20191218033645.5037-1-e@80x24.org> <20191218033645.5037-6-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191218033645.5037-6-e@80x24.org> List-Id: Eric Wong wrote: > diff --git a/t/common.perl b/lib/PublicInbox/TestCommon.pm > similarity index 94% > rename from t/common.perl > rename to lib/PublicInbox/TestCommon.pm > index 288a0a19..2804b5b6 100644 > --- a/t/common.perl > +++ b/lib/PublicInbox/TestCommon.pm > @@ -1,11 +1,15 @@ > # Copyright (C) 2015-2019 all contributors > # License: AGPL-3.0+ > > +# internal APIs used only for tests > +package PublicInbox::TestCommon; Oops, forgot to account for the namespace change in the uncommon tail(1) support code path. Will squash the following: diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 2804b5b6..45306a5a 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -279,7 +279,7 @@ sub DESTROY { my ($self) = @_; return if $self->{owner} != $$; if (my $tail = delete $self->{tail_pid}) { - ::wait_for_tail(); + PublicInbox::TestCommon::wait_for_tail(); CORE::kill('TERM', $tail); } my $pid = delete $self->{pid} or return;