microsoft/VFSForGit

Corrupt object tests failing with latest microsoft/git version

derrickstolee opened this issue · 0 comments

If I run the functional tests with microsoft/git version v2.43.0.vfs.0.0, then I get the following errors:

Test GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.LooseObjectStepTests.CorruptLooseObjectIsDeleted()
Failed at 8:26:13 AM taking 00:00:51.9717655
  Step failed to delete corrupt blob
  Expected: False
  But was:  True

=> GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitCorruptObjectTests.GitRequestsReplacementForTruncatedObject()
Test GVFS.FunctionalTests.Tests.EnlistmentPerFixture.GitCorruptObjectTests.GitRequestsReplacementForTruncatedObject()
Failed at 8:26:10 AM taking 00:00:02.1702420
  Expected: 0
  But was:  128

I've proposed for these tests to be modified in #1804 as a temporary measure, but perhaps we should leave them in until we can demonstrate the problem by updating the Git version pin to a more-recent release.

The "fix" would actually need to be in microsoft/git to fix the handling of these bad objects in a way that auto-heals.

The good news is that the need for this functionality is greatly diminished. It was created this way because VFS for Git's early versions would not use temporary files and would frequently create files that were not fsync'd resulting in empty or truncated files. All versions in the last five years have been more careful to avoid this behavior, so we don't need to clean up these bad files as much as we have historically.

With that context in mind, one acceptable fix might be to remove these tests altogether as not being an expected behavior.