Petraeus agrees to testify on Libya attack

Former CIA director to voluntarily appear before congressional committees