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

Re: [PATCH v7] read-cache: force_verify_index_checksum

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
May 8, 2017, 16:50 UTC
Message-ID
<962eefec-2ea6-6b43-7bd5-51da4150bb6a@jeffhostetler.com>
In-Reply-To
<CAP8UFD2v8R8bSjUi8+1271fJ=jR5JbbGfgO_fdeYpzE=EGx_Pw@mail.gmail.com>
On 5/8/2017 5:45 AM, Christian Couder wrote:
Show 29 quoted lines
> On Fri, Apr 14, 2017 at 10:32 PM,  <git@jeffhostetler.com> wrote:
>> diff --git a/t/t1450-fsck.sh b/t/t1450-fsck.sh
>> index 33a51c9..677e15a 100755
>> --- a/t/t1450-fsck.sh
>> +++ b/t/t1450-fsck.sh
>> @@ -689,4 +689,17 @@ test_expect_success 'bogus head does not fallback to all heads' '
>>         ! grep $blob out
>>  '
>>
>> +test_expect_success 'detect corrupt index file in fsck' '
>> +       cp .git/index .git/index.backup &&
>> +       test_when_finished "mv .git/index.backup .git/index" &&
>> +       echo zzzzzzzz >zzzzzzzz &&
>> +       git add zzzzzzzz &&
>> +       sed -e "s/zzzzzzzz/yyyyyyyy/" .git/index >.git/index.yyy &&
>> +       mv .git/index.yyy .git/index &&
>> +       # Confirm that fsck detects invalid checksum
>> +       test_must_fail git fsck --cache &&
>> +       # Confirm that status no longer complains about invalid checksum
>> +       git status
>> +'
>
> This test does not pass when the GIT_TEST_SPLIT_INDEX env variable is
> set on my Linux machine.
>
> Also it looks like you sent a v8 of this patch series with a different
> test, but what is in master looks like the above test instead of the
> test in your v8.
>

There was concern about using sed on a binary file not being portable and a request to change the test to just corrupt the checksum rather than an index-entry, so I changed it in v8.

Does the v8 version of the test also fail on your machine ?

Thanks Jeff

Previous: Christian CouderNext: Christian Couder
Message 9 of 13 in “read-cache: call verify_hdr() in a background thread”
  1. read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Apr 14, 2017
  2. read-cache: force_verify_index_checksumgit@jeffhostetler.com, Apr 14, 2017
  3. Johannes SixtApr 24, 2017
  4. Jeff HostetlerApr 24, 2017
  5. Junio C HamanoApr 25, 2017
  6. Johannes SchindelinApr 25, 2017
  7. Junio C HamanoApr 26, 2017
  8. Christian CouderMay 8, 2017
  9. Jeff HostetlerMay 8, 2017
  10. Christian CouderMay 8, 2017
  11. Jeff HostetlerMay 8, 2017
  12. Junio C HamanoMay 9, 2017
  13. Junio C HamanoMay 9, 2017

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.