git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[Test] t1901 - sparse checkout file when lock is taken fails (subtest 19)

From
Randall S. Becker <rsbecker@nexbridge.com>
Date
Mar 5, 2020, 15:45 UTC
Message-ID
<018001d5f305$0c709af0$2551d0d0$@nexbridge.com>
Hi All,

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 #

Regards, Randall

-- Brief whoami:
 NonStop developer since approximately 211288444200000000
 UNIX developer since approximately 421664400
-- In my real life, I talk too much.
Next: Martin Ågren
Message 1 of 4 in “[Test] t1901 - sparse checkout file when lock is taken fails (subtest 19)”
  1. Randall S. BeckerMar 5, 2020
  2. t1091: don't grep for `strerror()` stringMartin Ågren, Mar 8, 2020
  3. Derrick StoleeMar 9, 2020
  4. Junio C HamanoMar 9, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.