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,AWL,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 916CD1F9F4 for ; Tue, 14 Sep 2021 02:39:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/5] test_common: remove non-hidden files, first Date: Tue, 14 Sep 2021 02:39:04 +0000 Message-Id: <20210914023905.21410-5-e@80x24.org> In-Reply-To: <20210914023905.21410-1-e@80x24.org> References: <20210914023905.21410-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We want to remove any inotify-watched files before removing ~/.local/lei/store/ipc.lock, since sto_done_request was failing on attempts to lock a non-existent lei/store/ipc.lock file. --- lib/PublicInbox/TestCommon.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index d8346673..0ee4b228 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -567,7 +567,10 @@ SKIP: { } local $ENV{XDG_RUNTIME_DIR} = $daemon_xrd; $cb->(); - unless ($persist) { + if ($persist) { # remove before ~/.local gets removed + File::Path::rmtree([glob("$home/*")]); + File::Path::rmtree("$home/.config"); + } else { lei_ok(qw(daemon-pid), \"daemon-pid after $t"); chomp($daemon_pid = $lei_out); if (!$daemon_pid) {