-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Windows crash dump checks asynchronous. (#30156)
- Loading branch information
Showing
8 changed files
with
338 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
26 changes: 26 additions & 0 deletions
26
pkg/collector/corechecks/system/wincrashdetect/probe/wincrash_testutil.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2024-present Datadog, Inc. | ||
|
||
//go:build test && windows | ||
|
||
package probe | ||
|
||
type readCrashDumpType func(filename string, ctx *logCallbackContext, _ *uint32) error | ||
type parseCrashDumpType func(wcs *WinCrashStatus) | ||
|
||
// SetCachedSettings sets the settings used for tests without reading the Registry. | ||
func (p *WinCrashProbe) SetCachedSettings(wcs *WinCrashStatus) { | ||
p.status = wcs | ||
} | ||
|
||
// OverrideCrashDumpReader relpaces the crash dump reading function for tests. | ||
func OverrideCrashDumpReader(customCrashReader readCrashDumpType) { | ||
readfn = customCrashReader | ||
} | ||
|
||
// OverrideCrashDumpParser relpaces the crash dump parsing function for tests. | ||
func OverrideCrashDumpParser(customParseCrashDump parseCrashDumpType) { | ||
parseCrashDump = customParseCrashDump | ||
} |
This file contains 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
Oops, something went wrong.