integrationtest

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildFuzzTarget

func BuildFuzzTarget(t *testing.T, name string) string

func CheckReports

func CheckReports(t *testing.T, reports []*report.Report, options *CheckReportOptions)

CheckReports offers an easy way to check a set of reports against some options

func FuzzTestExecutablePath

func FuzzTestExecutablePath(t *testing.T, buildDir, fuzzTest string) string

func TempBuildDir

func TempBuildDir(t *testing.T) string

func TestDataDir

func TestDataDir(t *testing.T) string

func TestWithAndWithoutMinijail

func TestWithAndWithoutMinijail(t *testing.T, f func(t *testing.T, disableMinijail bool))

Types

type ChannelPassthrough

type ChannelPassthrough struct {
	// contains filtered or unexported fields
}

ChannelPassthrough pipes the reports from the runner package to a report channel and also prints them to stdout

func (*ChannelPassthrough) Handle

func (cp *ChannelPassthrough) Handle(report *report.Report) error

type CheckReportOptions

type CheckReportOptions struct {
	ErrorType           finding.ErrorType
	SourceFile          string
	Details             string
	AllowEmptyInputData bool
	NumFindings         int
}

type RunnerTest

type RunnerTest struct {
	FuzzTarget         string
	Engine             config.Engine
	GeneratedCorpusDir string
	Timeout            time.Duration
	EngineArgs         []string
	FuzzTestArgs       []string
	FuzzerEnv          []string
	DisableMinijail    bool
	RunsLimit          int
	LogOutput          *bytes.Buffer
	ProjectDir         string
}

RunnerTest helps to execute tests for the runner package

func NewLibfuzzerTest

func NewLibfuzzerTest(t *testing.T, buildDir, fuzzTarget string, disableMinijail bool) *RunnerTest

func (*RunnerTest) RequireSeedCorpusNotEmpty

func (test *RunnerTest) RequireSeedCorpusNotEmpty(t *testing.T)

func (*RunnerTest) Run

func (test *RunnerTest) Run(t *testing.T) (string, []*report.Report)

Run makes sure that all the test output gets captured

func (*RunnerTest) Start

func (test *RunnerTest) Start(t *testing.T, reportCh chan *report.Report) error

Start selects the needed runner and execute it with the given options

Jump to

Keyboard shortcuts

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