diff options
| author | Laura Peskin <pesk@google.com> | 2023-10-30 17:22:43 -0700 |
|---|---|---|
| committer | glpesk <114444708+glpesk@users.noreply.github.com> | 2023-10-31 18:19:16 +0000 |
| commit | 69904c9f85fcfb289eb529599176d42bcb3609eb (patch) | |
| tree | fa4d1a788db9fdd75e90677746696a4958e650f0 | |
| parent | c24d931d648b9299389381637b0377eb02907c37 (diff) | |
vm/starnix: don't block on syz-fuzzer command
After this change, the instance's `MonitorExecution` method runs
concurrently with test program execution, as intended. Basic
crash detection is working.
TODOs for follow-ups include:
- testing that crashes are repro'd and reports are generated
- restarting the vm after a crash
| -rw-r--r-- | vm/starnix/starnix.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vm/starnix/starnix.go b/vm/starnix/starnix.go index 78bad4a44..9d0cb1acb 100644 --- a/vm/starnix/starnix.go +++ b/vm/starnix/starnix.go @@ -180,7 +180,10 @@ func (inst *instance) startFuchsiaVM() error { } func (inst *instance) startFuchsiaLogs() error { - cmd := osutil.Command(ffxBinary, "--target", inst.name, "log") + // `ffx log` outputs some buffered logs by default, and logs from early boot + // trigger a false positive from the unexpected reboot check. To avoid this, + // only request logs from now on. + cmd := osutil.Command(ffxBinary, "--target", inst.name, "log", "--since", "now") cmd.Dir = inst.fuchsiaDirectory cmd.Stdout = inst.wpipe cmd.Stderr = inst.wpipe @@ -303,7 +306,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin cmd.Dir = inst.workdir cmd.Stdout = wpipe cmd.Stderr = wpipe - if err := cmd.Run(); err != nil { + if err := cmd.Start(); err != nil { wpipe.Close() return nil, nil, err } |
