From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MALFORMED_FREEMAIL,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEEECC433DB for ; Wed, 24 Mar 2021 13:50:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABB2861A01 for ; Wed, 24 Mar 2021 13:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235430AbhCXNtb (ORCPT ); Wed, 24 Mar 2021 09:49:31 -0400 Received: from mout.gmx.net ([212.227.17.20]:35837 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235684AbhCXNtX (ORCPT ); Wed, 24 Mar 2021 09:49:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1616593752; bh=+XrJ4e1BN5SS8SxFDwTiQA7hFp4xwYldVw5Mh7Fc//w=; h=X-UI-Sender-Class:Date:From:To:cc:Subject:In-Reply-To:References; b=kmBQJOzS/Qzj9omzRjQfWkudgzeecA6qksHCwQxFFBaW5XpuDVcY7CX7502uB3Xcl ODOKknCTrujPKqJMhMJq2Buj4yCAyA523OGIcn592WJstRZM35xqn4pkwpQSieqQkx qAaj+k+/uOkNlvaNtAXVRoaM7gkWUb/p1eqLDSXo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [172.18.9.78] ([213.196.212.127]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mw9UK-1lhpkq0q84-00s3I8; Wed, 24 Mar 2021 14:49:12 +0100 Date: Wed, 24 Mar 2021 13:01:49 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@gitforwindows.org To: =?UTF-8?Q?=C3=86var_Arnfj=C3=B6r=C3=B0_Bjarmason?= cc: Johannes Schindelin via GitGitGadget , git@vger.kernel.org, Junio C Hamano , =?UTF-8?Q?SZEDER_G=C3=A1bor?= , Jeff King Subject: Re: [PATCH v6 16/21] mingw: try to work around issues with the test cleanup In-Reply-To: <87a6qxzocs.fsf@evledraar.gmail.com> Message-ID: References: <991b41afa4a83a73f59a72504d269d64d12ecf8f.1548771561.git.gitgitgadget@gmail.com> <87zgzbgp1i.fsf@evledraar.gmail.com> <87a6qxzocs.fsf@evledraar.gmail.com> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1544568225-1616587311=:50" X-Provags-ID: V03:K1:Oubbp74T7wZUZt8Qj6DpjBvYiskyeo2cHe/dIe9WTB98/ejNC97 zxoWAqZIejz0N26N0uQ8oLRv5Jru2YC4pYnL5MeHp6D0N2jiUI3HPJsJjPK7jQ+rtFYKXUA kPMtqeH+fmIqgu578thOjAUy2KgvMQSbkwQxT+oRbA/ufiLlBypWyKJqE7PzSEYKkYZJVRo 79LjovV87VhvPBtlGgnww== X-UI-Out-Filterresults: notjunk:1;V03:K0:epeyTpo+k2I=:zs1IMDU+rFIQC8lygh0axA dCJULiHOCeErq2QWnq3G711P4UcXqvkgvCgIhOabnykcIM5BmFsq4wEbv9AshORiU0/en6N7k /q6+bsx2m6gJwxnfRxu0NzQqhKkDXRgFu4GZyvXD24dl6K3aQMNriOschmqpfeqefvcxW9KyF m3yt1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OlLHPar72Dcwnt RG+wl3WHXqMtZMr7a Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1544568225-1616587311=:50 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi =C3=86var, On Sat, 20 Mar 2021, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: > On Fri, Mar 19 2021, Johannes Schindelin wrote: > > >> On Tue, Jan 29 2019, Johannes Schindelin via GitGitGadget wrote: > >> > >> > From: Johannes Schindelin > >> > > >> > It seems that every once in a while in the Git for Windows SDK, the= re > >> > are some transient file locking issues preventing the test clean up= to > >> > delete the trash directory. Let's be gentle and try again five seco= nds > >> > later, and only error out if it still fails the second time. > >> > > >> > This change helps Windows, and does not hurt any other platform > >> > (normally, it is highly unlikely that said deletion fails, and if i= t > >> > does, normally it will fail again even 5 seconds later). > >> > > >> > Signed-off-by: Johannes Schindelin > >> > --- > >> > t/test-lib.sh | 6 +++++- > >> > 1 file changed, 5 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/t/test-lib.sh b/t/test-lib.sh > >> > index f31a1c8f79..9c0ca5effb 100644 > >> > --- a/t/test-lib.sh > >> > +++ b/t/test-lib.sh > >> > @@ -1104,7 +1104,11 @@ test_done () { > >> > error "Tests passed but trash directory already removed before = test cleanup; aborting" > >> > > >> > cd "$TRASH_DIRECTORY/.." && > >> > - rm -fr "$TRASH_DIRECTORY" || > >> > + rm -fr "$TRASH_DIRECTORY" || { > >> > + # try again in a bit > >> > + sleep 5; > >> > + rm -fr "$TRASH_DIRECTORY" > >> > + } || > >> > error "Tests passed but test cleanup failed; aborting" > >> > fi > >> > test_at_end_hook_ > >> > >> I saw this sleep while reading some test-lib.sh code, doesn't this br= eak > >> df4c0d1a79 (test-lib: abort when can't remove trash directory, > >> 2017-04-20) for non-Windows platforms? > > > > It does not really break it, it just delays the inevitable failure. I still think this is the best answer to this (implicit) question: > In any case, your patch clearly undoes whatever canary for gc issues > df4c0d1a792 was trying to put into the test-lib, but didn't say so in > its commit message. I was not _really_ paying attention to that commit when I implemented the work-around you mentioned above. At the same time I think it does _not_ undo the canary. If the trash directory cannot be removed via `rm -fr`, and if that is an indicator for something fishy going on, chances are that the second `rm -fr` a couple seconds later will _also_ fail, and we still get that error message. The only reason why the second `rm` should succeed, at least that I can think of, is that something on Windows blocked those files from being deleted, and it is no longer blocking after a couple seconds, and that usually means that an anti-malware scanned those files. Ciao, Dscho --8323328-1544568225-1616587311=:50--