diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-01-28 19:01:33 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-01-30 11:47:19 +0000 |
| commit | ec434200ebafacb1b16633f766a0501d79e9db99 (patch) | |
| tree | a5be6c84867c159d2ceb2b5b4b7ab253b341e5f6 /pkg/fuzzer/fuzzer_test.go | |
| parent | e961d16c3e35fd78acdfaf5531fc1c1365c24a97 (diff) | |
pkg/fuzzer: collect executor debug logs in tests
It should hopefully let us debug #5674.
Diffstat (limited to 'pkg/fuzzer/fuzzer_test.go')
| -rw-r--r-- | pkg/fuzzer/fuzzer_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/fuzzer/fuzzer_test.go b/pkg/fuzzer/fuzzer_test.go index 6049ac615..145ce5c8b 100644 --- a/pkg/fuzzer/fuzzer_test.go +++ b/pkg/fuzzer/fuzzer_test.go @@ -159,9 +159,11 @@ func (f *testFuzzer) run() { f.crashes = make(map[string]int) ctx, done := context.WithCancel(context.Background()) f.done = done + var output bytes.Buffer cfg := &rpcserver.LocalConfig{ Config: rpcserver.Config{ Config: vminfo.Config{ + Debug: true, Target: f.target, Features: flatrpc.FeatureSandboxNone, Sandbox: flatrpc.ExecEnvSandboxNone, @@ -169,15 +171,17 @@ func (f *testFuzzer) run() { Procs: 4, Slowdown: 1, }, - Executor: f.executor, - Dir: f.t.TempDir(), - Context: ctx, + Executor: f.executor, + Dir: f.t.TempDir(), + Context: ctx, + OutputWriter: &output, } cfg.MachineChecked = func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) queue.Source { cfg.Cover = true return f } if err := rpcserver.RunLocal(cfg); err != nil { + f.t.Logf("executor output:\n%s", output.String()) f.t.Fatal(err) } assert.Equal(f.t, len(f.expectedCrashes), len(f.crashes), "not all expected crashes were found") |
