THROWAWAY: validate failure-diagnostics capture in CI (do not merge)#8
Draft
tyrielv wants to merge 2 commits into
Draft
THROWAWAY: validate failure-diagnostics capture in CI (do not merge)#8tyrielv wants to merge 2 commits into
tyrielv wants to merge 2 commits into
Conversation
When a functional test fails because its GVFS.Mount is unreachable (a hang or silent exit), we currently have no post-mortem data. Per-test enlistment .gvfs/logs are deleted at teardown and only survive as full-file contents inlined into the console by TestResultsHelper.OutputGVFSLogs -- lossy under parallel fixtures and empty when the mount hung. There is no process dump, so a mount deadlock leaves zero diagnostic signal. On test failure only, into a CI-uploadable diagnostics directory: - Capture a full-memory minidump of each still-running GVFS.Mount process for the failing enlistment (a hung mount is still alive at teardown). New Tools/MiniDump.cs P/Invokes MiniDumpWriteDump (dbghelp); Windows-only, best-effort, never throws. Full memory is required so managed call stacks are resolvable in WinDbg/SOS. - Robustly copy the enlistment .gvfs/logs. A plain File.Copy is tried first; if the file is locked (a hung mount still holds its log open), fall back to a read-only shared handle (FileShare.ReadWrite | Delete) and copy whatever has been flushed -- partial content is still useful. GVFSFunctionalTestEnlistment.CaptureFailureDiagnostics runs first in DeleteEnlistment, gated on TestStatus.Failed, before the enlistment directory is deleted. The mount-process PID discovery is extracted from KillMountProcess into a shared GetMountProcessIds helper. CI: functional-tests.yaml sets GVFS_TEST_DIAGNOSTICS_DIR and uploads it as a FailureDiagnostics artifact with if: always(). Assisted-by: Claude Opus 4.8 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Temporary branch to validate the mount-dump + log-preservation capture in CI: - Add FailureDiagnosticsSmokeTests: mounts an enlistment then Assert.Fail()s while the mount is still alive, so CaptureFailureDiagnostics writes a minidump and preserves the logs. - Program.cs: restrict the run to only the FailureDiagnosticsSmoke category so CI exercises the diagnostics quickly instead of the full suite. - functional-tests.yaml: reduce the matrix to a single x64 job and run all (smoke) tests in one slice. Assisted-by: Claude Opus 4.8 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
THROWAWAY — do not merge. CI-only validation of the failure-diagnostics
capture added in
tyrielv/ft-failure-diagnostics.This branch:
FailureDiagnosticsSmokeTests, which mounts an enlistment and thenAssert.Fail()s while the mount is still alive, soCaptureFailureDiagnosticswrites a GVFS.Mount minidump and preserves the.gvfs/logs.matrix to a single x64 job for speed.
Expected result: the Functional Tests job fails (by design), and a
FailureDiagnostics_Release_x64-0artifact is uploaded containing the mount.dmpand copied logs. That artifact is what we're validating.Once verified, this branch and PR are discarded; the real change ships via
tyrielv/ft-failure-diagnostics.