You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Complete MSTEST0077 test coverage: [DoNotParallelize] opt-out and remaining Directory.* allowlist entries #10305
Follow-up to #10299 / the delete-move coverage PR, which deliberately kept its scope to the delete/move path-role logic.
Two adjacent gaps in SharedFileSystemPathInTestAnalyzerTests remain:
1. No [DoNotParallelize] negative test
SharedFileSystemPathInTestAnalyzer bails out via ParallelSafetyHelper.IsOptedOutOfParallelization before reporting:
// Opting out of parallelization (sequential phase) removes the collision risk entirely, so stay silentif(ParallelSafetyHelper.IsOptedOutOfParallelization(testMethod,doNotParallelizeAttributeSymbol,testMethodAttributeSymbol)){return;}
That branch is entirely untested for MSTEST0077, even though the sibling analyzers (CurrentDirectoryMutation…, CultureMutation…) both carry a WhenDoNotParallelizeDeclared_NoDiagnostic test as an established convention. A constant-path File.WriteAllText/File.Delete inside a [DoNotParallelize] test is exactly the shape that must stay quiet.
2. Untested entries in the Directory.* allowlist
IsMutatingFileSystemMethod's directory arm lists CreateDirectory, CreateSymbolicLink, Delete, Move, SetCreationTime(Utc), SetLastAccessTime(Utc), SetLastWriteTime(Utc). Only CreateDirectory, Delete, and Move are covered. Directory.CreateSymbolicLink and the Directory.Set*Time* family have no tests.
Note for whoever picks this up
[ResourceLock] is not an opt-out for MSTEST0077 — the analyzer never calls HasResourceLockFor/HasAnyResourceLock, unlike CurrentDirectoryMutation…/CultureMutation…. Do not copy a WhenResourceLockDeclared_NoDiagnostic test over from those files; it would assert behavior this rule does not have.
Activity