Skip to content

Remove ExtraCoverage category — run all functional tests in CI#1997

Draft
tyrielv wants to merge 2 commits into
microsoft:masterfrom
tyrielv:tyrielv/remove-extra-coverage
Draft

Remove ExtraCoverage category — run all functional tests in CI#1997
tyrielv wants to merge 2 commits into
microsoft:masterfrom
tyrielv:tyrielv/remove-extra-coverage

Conversation

@tyrielv
Copy link
Copy Markdown
Contributor

@tyrielv tyrielv commented Jun 2, 2026

Summary

The ExtraCoverage category excluded ~110 functional test methods (19 test classes) from the default test run and CI. These tests cover critical functionality - mount edge cases, dehydrate, repair, shared cache, disk layout upgrades, junctions, and more - but were never validated in CI, only via the --extra-only flag.

This PR removes ExtraCoverage filtering, fixes atrophied tests, and introduces infrastructure to track tests that still need work.

Infrastructure changes

  • Remove ExtraCoverage filtering - delete ExtraCoverage constant, --extra-only flag handling, and all [Category(Categories.ExtraCoverage)] annotations (19 usages)
  • Download FastFetch artifact in functional-tests.yaml so FastFetch tests find the exe
  • Fix NUnitRunner slice grouping - extend regex to include MultiEnlistmentTests alongside EnlistmentPerFixture, preventing Order-dependent tests from splitting across slices
  • Introduce SkipInCIAttribute with a required reason string, replacing the bare NeedsReactionInCI category. Makes it clear why each test is skipped
  • Increase test slices from 10 to 12 to distribute the additional test load
  • Resilient teardown - UnmountAndDeleteAll catches TimeoutException from stuck unmounts and kills the GVFS.Mount process as a fallback, preventing a single hung unmount from eating 5 minutes of CI time
  • Update AuthoringTests.md documentation

Fixed tests (now running in CI)

Test Fix
FastFetchTests (15 methods) FastFetch artifact now downloaded in CI
ConfigVerbTests (8 methods) Slice grouping keeps Order-dependent tests together
RepairTests (3 methods) Removed stale mount-fail assertions - GVFS now tolerates corrupt index
FastFetchTests.CanFetchIntoEmptyGitRepoAndCheckoutWithGit Fixed git output assertion (casing changed between git versions)
MountTests.MountFailsWhenNoOnDiskVersion Wrapped in try/finally for reliable metadata restoration
MountTests.MountFailsWhenNoLocalCacheRootInRepoMetadata Check exit code only (error messages now go to GVFS log, not stdout)
MountTests.MountFailsWhenNoGitObjectsRootInRepoMetadata Same as above
MountTests.MountShouldFail helper Now captures stderr in addition to stdout
All other MountTests Fixed cascade failures via try/finally + stderr capture

Removed tests

Test Reason
UpgradeReminderTests (3 methods) Old NuGet-based upgrade reminder system removed from service
SharedCacheUpgradeTests (entire class) Zero test methods - dead code
MountTests.MountMergesLocalPrePostHooksConfig Mount no longer merges local hook config; just overwrites with GVFS.Hooks.exe

Still SkipInCI (follow-up work)

Test Count Reason
DehydrateTests 18 Atrophied: folder dehydrate behavior changed substantially
WindowsDiskLayoutUpgradeTests 4 Atrophied: expected path/placeholder counts drifted
SharedCacheTests.RepairFixesCorruptBlobSizesDatabase 1 Product bug: mount crashes after repair of corrupt BlobSizes.sql
LooseObjectStepTests 3 Pre-existing flaky (timing-sensitive)
PrefetchVerbTests 2 Pre-existing flaky (blob count varies)

Timing impact

No measurable CI time increase. The additional ~80 tests that now run fit within the 12-slice parallelism. Baseline slowest slice was ~8.7 min; with the changes it's comparable.

@tyrielv tyrielv force-pushed the tyrielv/remove-extra-coverage branch 3 times, most recently from 1e0c363 to 4bad6ac Compare June 3, 2026 16:35
The ExtraCoverage category excluded ~110 functional test methods (19
test classes) from the default CI run. These tests cover critical
functionality -- mount edge cases, dehydrate, repair, shared cache,
disk layout upgrades, junctions -- but were never validated in CI.

Remove ExtraCoverage filtering and fix the atrophied tests so they
run in CI. Introduce SkipInCIAttribute with a required reason string
for tests that still need follow-up work.

Infrastructure:
- Remove ExtraCoverage constant, --extra-only flag, and all 19
  Category annotations
- Download FastFetch artifact in functional-tests.yaml
- Fix NUnitRunner slice grouping to include MultiEnlistmentTests
- Increase test slices from 10 to 12
- Add resilient teardown: UnmountAndDeleteAll catches stuck unmounts
  and kills the GVFS.Mount process as a fallback

Fixed tests:
- FastFetchTests: artifact now available in CI
- ConfigVerbTests: Order-dependent tests stay in same slice
- RepairTests: remove stale mount-fail assertions (GVFS now tolerates
  corrupt index)
- MountTests: capture stderr, use try/finally for metadata restore,
  check exit code only where errors go to GVFS log
- FastFetchTests git output assertion: case-insensitive match

Removed tests:
- UpgradeReminderTests: old NuGet upgrade system removed
- SharedCacheUpgradeTests: zero test methods (dead code)
- MountMergesLocalPrePostHooksConfig: mount no longer merges hooks
- ProjFS_CMDHangNoneActiveInstance: obsolete ProjFS regression test
- MountingARepositoryThatRequiresPlaceholderUpdatesWorks: placeholder
  updates moved out of mount

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv force-pushed the tyrielv/remove-extra-coverage branch from 13757bf to 7d1e72c Compare June 3, 2026 17:41
The repair job for BlobSizes.sql was unable to delete the corrupt
database file on Windows because SQLite connection pooling kept
the file handle open after the integrity check in HasIssue().

Two fixes:

1. SqliteDatabase.HasIssue: Use Pooling=False for integrity check
   connections so file handles are released immediately on dispose,
   allowing repair to delete the corrupt file.

2. BlobSizes.Initialize: Tolerate corrupt databases by catching
   SQLITE_CORRUPT and SQLITE_NOTADB errors, deleting the corrupt
   file (and WAL/SHM sidecars), and recreating a fresh database.
   This provides defense-in-depth since BlobSizes is a cache.

Also remove SkipInCI from RepairFixesCorruptBlobSizesDatabase and
add an assertion that repair actually cleans up the corrupt folder.

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant