diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-06-28 11:54:19 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-07-01 09:13:47 +0000 |
| commit | 528b3bb623250193b5b01c2a99910eb46e85cc9e (patch) | |
| tree | ffe2851d872ef9b30ac4ea7f058e46fe52ff36b6 /vm/qemu | |
| parent | b294e901e293e41b6374f056dcc8d4329780455c (diff) | |
vm/qemu: remove an unused diagnose field
We never write to the channel.
Diffstat (limited to 'vm/qemu')
| -rw-r--r-- | vm/qemu/qemu.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index 738ff5acf..3749dd317 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -108,7 +108,6 @@ type instance struct { qemu *exec.Cmd merger *vmimpl.OutputMerger files map[string]string - diagnose chan bool } type archConfig struct { @@ -368,7 +367,6 @@ func (pool *Pool) ctor(workdir, sshkey, sshuser string, index int) (vmimpl.Insta workdir: workdir, sshkey: sshkey, sshuser: sshuser, - diagnose: make(chan bool, 1), } if st, err := os.Stat(inst.image); err == nil && st.Size() == 0 { // Some kernels may not need an image, however caller may still @@ -683,15 +681,11 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin } go func() { - retry: select { case <-time.After(timeout): signal(vmimpl.ErrTimeout) case <-stop: signal(vmimpl.ErrTimeout) - case <-inst.diagnose: - cmd.Process.Kill() - goto retry case err := <-inst.merger.Err: cmd.Process.Kill() if cmdErr := cmd.Wait(); cmdErr == nil { |
