diff options
| -rw-r--r-- | pkg/runtest/run_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/runtest/run_test.go b/pkg/runtest/run_test.go index 09a401bb7..f37c7612c 100644 --- a/pkg/runtest/run_test.go +++ b/pkg/runtest/run_test.go @@ -484,6 +484,7 @@ func startRPCServer(t *testing.T, target *prog.Target, executor string, // We don't need many procs for this test. procs = min(procs, 4) } + var output bytes.Buffer cfg := &rpcserver.LocalConfig{ Config: rpcserver.Config{ Config: vminfo.Config{ @@ -504,6 +505,8 @@ func startRPCServer(t *testing.T, target *prog.Target, executor string, GDB: *flagGDB, MaxSignal: extra.maxSignal, CoverFilter: extra.coverFilter, + // Note that when *flagGDB is set, the option is ignored. + OutputWriter: &output, } cfg.MachineChecked = func(features flatrpc.Feature, syscalls map[*prog.Syscall]bool) queue.Source { if extra.machineChecked != nil { @@ -520,6 +523,7 @@ func startRPCServer(t *testing.T, target *prog.Target, executor string, t.Cleanup(func() { done() if err := <-errc; err != nil { + t.Logf("executor output:\n%s", output.String()) t.Fatal(err) } // We need to retry b/c we don't wait for all executor subprocesses (only set PR_SET_PDEATHSIG), @@ -532,6 +536,7 @@ func startRPCServer(t *testing.T, target *prog.Target, executor string, time.Sleep(100 * time.Millisecond) continue } + t.Logf("executor output:\n%s", output.String()) t.Fatalf("failed to remove temp dir %v: %v", dir, err) } }) |
