Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt object tests failing with latest microsoft/git version #1805

Open
derrickstolee opened this issue Feb 15, 2024 · 0 comments
Open

Corrupt object tests failing with latest microsoft/git version #1805

derrickstolee opened this issue Feb 15, 2024 · 0 comments

Comments

@derrickstolee
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant