integrationtest

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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