aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-05-17 12:48:07 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-05-17 11:26:58 +0000
commita12e99e74dfc7cbe54720d8383cec46aaf024a28 (patch)
tree1f53d3842efba0b71cea49b4948c0c24450e47f9 /pkg/csource
parente09a60f8522234ba7968e421dd9d2e6d86af69db (diff)
pkg/csource: remove the Repro option
Enable it unconditionally.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/common.go1
-rw-r--r--pkg/csource/csource.go4
-rw-r--r--pkg/csource/options.go7
-rw-r--r--pkg/csource/options_test.go7
4 files changed, 2 insertions, 17 deletions
diff --git a/pkg/csource/common.go b/pkg/csource/common.go
index 600ac43b6..109863418 100644
--- a/pkg/csource/common.go
+++ b/pkg/csource/common.go
@@ -123,7 +123,6 @@ func commonDefines(p *prog.Prog, opts Options) map[string]bool {
"SYZ_VHCI_INJECTION": opts.VhciInjection,
"SYZ_USE_TMP_DIR": opts.UseTmpDir,
"SYZ_HANDLE_SEGV": opts.HandleSegv,
- "SYZ_REPRO": opts.Repro,
"SYZ_TRACE": opts.Trace,
"SYZ_WIFI": opts.Wifi,
"SYZ_802154": opts.IEEE802154,
diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go
index 3d019a59c..1f338b893 100644
--- a/pkg/csource/csource.go
+++ b/pkg/csource/csource.go
@@ -188,9 +188,7 @@ func (ctx *context) generateSyscalls(calls []string, hasVars bool) string {
if len(calls) > 0 && (hasVars || opts.Trace) {
fmt.Fprintf(buf, "\tintptr_t res = 0;\n")
}
- if opts.Repro {
- fmt.Fprintf(buf, "\tif (write(1, \"executing program\\n\", sizeof(\"executing program\\n\") - 1)) {}\n")
- }
+ fmt.Fprintf(buf, "\tif (write(1, \"executing program\\n\", sizeof(\"executing program\\n\") - 1)) {}\n")
if opts.Trace {
fmt.Fprintf(buf, "\tfprintf(stderr, \"### start\\n\");\n")
}
diff --git a/pkg/csource/options.go b/pkg/csource/options.go
index 9490e394a..ba6dcfbed 100644
--- a/pkg/csource/options.go
+++ b/pkg/csource/options.go
@@ -48,9 +48,6 @@ type Options struct {
UseTmpDir bool `json:"tmpdir,omitempty"`
HandleSegv bool `json:"segv,omitempty"`
- // Generate code for use with repro package to prints log messages,
- // which allows to detect hangs.
- Repro bool `json:"repro,omitempty"`
Trace bool `json:"trace,omitempty"`
LegacyOptions
}
@@ -169,7 +166,6 @@ func DefaultOpts(cfg *mgrconfig.Config) Options {
Sandbox: cfg.Sandbox,
UseTmpDir: true,
HandleSegv: true,
- Repro: true,
}
if cfg.TargetOS == targets.Linux {
opts.NetInjection = true
@@ -222,7 +218,7 @@ func deserializeLegacyOptions(data string, opts *Options) (int, error) {
"HandleSegv": &opts.HandleSegv,
"WaitRepeat": &ignoreBool,
"Debug": &ignoreBool,
- "Repro": &opts.Repro,
+ "Repro": &ignoreBool,
}
data = strings.TrimSpace(data)
@@ -366,6 +362,5 @@ var ExecutorOpts = Options{
Procs: 2,
Slowdown: 1,
Sandbox: "none",
- Repro: true,
UseTmpDir: true,
}
diff --git a/pkg/csource/options_test.go b/pkg/csource/options_test.go
index 5452f22ce..f7812e6b9 100644
--- a/pkg/csource/options_test.go
+++ b/pkg/csource/options_test.go
@@ -47,7 +47,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: true,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: true,
@@ -72,7 +71,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: true,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: true,
@@ -98,7 +96,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: true,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: true,
@@ -118,7 +115,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: false,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: false,
@@ -138,7 +134,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: false,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: false,
@@ -158,7 +153,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: false,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: false,
@@ -179,7 +173,6 @@ func TestParseOptionsCanned(t *testing.T) {
CloseFDs: true,
UseTmpDir: true,
HandleSegv: true,
- Repro: false,
LegacyOptions: LegacyOptions{
Collide: true,
Fault: false,