crash

package
v0.0.0-...-d046166 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package crash can be used by local tests to interact with on-device crash reports.

Index

Constants

View Source
const (
	// DefaultCrashDir contains the directory where the kernel writes core and minidump files.
	DefaultCrashDir = "/var/spool/crash"
	// ChromeCrashDir contains the directory where Chrome writes minidump files.
	// Tests configure Chrome to write crashes to this location/ by setting the BREAKPAD_DUMP_LOCATION
	// environment variable. This overrides the default /home/chronos/user/crash location, which is in
	// the user's cryptohome and hence is only accessible while they are logged in.
	ChromeCrashDir = "/home/chronos/crash"

	// BIOSExt is the extension for bios crash files.
	BIOSExt = ".bios_log"
	// CoreExt is the extension for core files.
	CoreExt = ".core"
	// MinidumpExt is the extension for minidump crash files.
	MinidumpExt = ".dmp"
	// LogExt is the extension for log files containing additional information that are written by crash_reporter.
	LogExt = ".log"
	// InfoExt is the extention for info files.
	InfoExt = ".info"
	// ProclogExt is the extention for proclog files.
	ProclogExt = ".proclog"
	// KCrashExt is the extension for log files created by kernel warnings and crashes.
	KCrashExt = ".kcrash"
	// GPUStateExt is the extension for GPU state files written by crash_reporter.
	GPUStateExt = ".i915_error_state.log.xz"
	// MetadataExt is the extension for metadata files written by crash collectors and read by crash_sender.
	MetadataExt = ".meta"
	// CompressedTxtExt is an extension on the compressed log files written by crash_reporter.
	CompressedTxtExt = ".txt.gz"
	// CompressedLogExt is an extension on the compressed log files written by crash_reporter.
	CompressedLogExt = ".log.gz"
)

Variables

This section is empty.

Functions

func CopyNewFiles

func CopyNewFiles(dstDir string, newPaths, oldPaths []string, maxPerExec int) (
	warnings map[string]error, err error)

CopyNewFiles copies paths that are present in newPaths but not in oldPaths into dstDir. If maxPerExec is positive, it limits the maximum number of files that will be copied for each base executable. The returned warnings map contains non-fatal errors keyed by crash file paths.

func CopySystemInfo

func CopySystemInfo(dstDir string) error

CopySystemInfo copies system information relevant to crash dumps (e.g. lsb-release) into dstDir.

func DefaultDirs

func DefaultDirs() []string

DefaultDirs returns all standard directories to which crashes are written.

func GetCrashes

func GetCrashes(dirs ...string) ([]string, error)

GetCrashes returns the paths of all files in dirs generated in response to crashes. Nonexistent directories are skipped.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL