From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Git'" <git@vger.kernel.org>
Subject: RE: [Test] t1901 - sparse checkout file when lock is taken fails (subtest 19)
Date: Tue, 10 Mar 2020 10:40:34 -0400 [thread overview]
Message-ID: <011401d5f6e9$de7eea50$9b7cbef0$@nexbridge.com> (raw)
In-Reply-To:
> From: Randall S. Becker <rsbecker@nexbridge.com>
On March 5, 2020 10:45 AM, I wrote:
> This one has me confused. It fails 100% of the time on NonStop. The test
> looks reasonable, as do the messages. I am not certain that test_i18ngrep
> works properly - it falls down to the return 1 statement which causes the
test
> to fail. The error message generated is "File already exists" not "File
exists"
> as is required in the test. We should not be testing for specific text
content
> originating from strerror - I thought we had this decision in a different
> thread. https://public-inbox.org/git/xmqq36intlpj.fsf@gitster-
> ct.c.googlers.com/
>
> Thoughts?
>
> expecting success of 1091.19 'fail when lock is taken':
> test_when_finished rm -rf repo/.git/info/sparse-checkout.lock &&
> touch repo/.git/info/sparse-checkout.lock &&
> test_must_fail git -C repo sparse-checkout set deep 2>err &&
> test_i18ngrep "File exists" err
>
> error: 'grep File exists err' didn't find a match in:
> fatal: Unable to create '/home/ituglib/randall/git/t/trash
directory.t1091-
> sparse-checkout-builtin/repo/.git/info/sparse-checkout.lock': File already
> exists. <----- this is the test issue
>
> Another git process seems to be running in this repository, e.g.
> an editor opened by 'git commit'. Please make sure all processes are
> terminated then try again. If it still fails, a git process may have
crashed in
> this repository earlier:
> remove the file manually to continue.
> not ok 19 - fail when lock is taken
> #
> # test_when_finished rm -rf
repo/.git/info/sparse-checkout.lock &&
> # touch repo/.git/info/sparse-checkout.lock &&
> # test_must_fail git -C repo sparse-checkout set deep 2>err
&&
> # test_i18ngrep "File exists" err
> #
This situation still occurs at 2.26.0-rc0. As above, this results from a
text compare to a platform-specific message that should not be used. To hack
around it, a possible fix (which I don't like) could be as follows:
index b4c9c32a03..d1fd225dad 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -305,7 +305,7 @@ test_expect_success 'fail when lock is taken' '
test_when_finished rm -rf repo/.git/info/sparse-checkout.lock &&
touch repo/.git/info/sparse-checkout.lock &&
test_must_fail git -C repo sparse-checkout set deep 2>err &&
- test_i18ngrep "File exists" err
+ test_i18ngrep "File \(already \)*exists" err
'
This does not remove the problem of platform error compares, but does allow
the test to temporarily pass.
Randall
next reply other threads:[~2020-03-10 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 14:40 Randall S. Becker [this message]
2020-03-11 22:06 ` [Test] t1901 - sparse checkout file when lock is taken fails (subtest 19) Junio C Hamano
2020-03-12 15:08 ` Randall S. Becker
-- strict thread matches above, loose matches on Subject: below --
2020-03-05 15:45 Randall S. Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='011401d5f6e9$de7eea50$9b7cbef0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).