session

package
v0.0.0-...-a517693 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2016 License: GPL-3.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	SESSION_FILE     = "session.json"
	SESSION_FILE_BCK = "session.json.bck"
	CONFIG_FILE      = "config.cfg"
	SUMMARY_FILE     = "summary.txt"
	TEST_CASES_DIR   = "test_cases"
	PRESERVATION_DIR = "crashes"
	DIR_PERMS        = 0755
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// SessionDir is the path from where this Session instance was loaded.
	// It is used when we want to re-save the instance to the same location,
	// without passing the path around.
	SessionDir      string
	TestCasesDir    string
	PreservationDir string
	Config          *config.Config
	Stats           Stats
}

Session contains enough information to restart a run of the fuzzer without reprocessing a set of already covered tests. This only makes sense when the run mode is to cover all tests once. Otherwise, the user can just restart the test with the same configuration and a different seed.

func Create

func Create(sessDir string, configPath string) (*Session, error)

func Resume

func Resume(sessDir string) (*Session, error)

Resume unmarshals an existing Session, found in sessDir, and returns it

func (*Session) LogSummary

func (s *Session) LogSummary() error

func (*Session) Save

func (s *Session) Save() error

Save stores the session back to the same location it was loaded from

type Stats

type Stats struct {
	CrashCount                int
	TestCasesProcessed        int
	TimedOutTests             int
	ExitCodeCounts            map[string]int
	TestCasesProcessedPerSeed map[string]int
}

func (*Stats) AddExitCode

func (s *Stats) AddExitCode(exitCode int)

func (*Stats) AddTestCaseForSeed

func (s *Stats) AddTestCaseForSeed(seed string)

AddTestCaseForSeed increments the test case counter for a particular seed file

Jump to

Keyboard shortcuts

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