Re: [Autotest] Adding kvm_subprocess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

On Thu, 2009-06-18 at 11:27 -0400, Michael Goldish wrote:
> kvm_subprocess is a little weird in that it does two different things --
> handling of both non-interactive subprocesses and SSH sessions.
> With this approach I don't think we need to write an SSH subclass of
> kvm_spawn because it already does a lot of SSH stuff.

Fair enough. I just happen to like the approach took by pexpect folks to
separate SSH implementation on a subclass, because the generic problem
itself is 'interacting with interactive programs on a programatic way',
and handling SSH connections is a subset of this problem.

> If we do any subclassing at all -- I suggest that we remove all the SSH
> stuff from kvm_spawn and put it in a subclass somehow, so that kvm_spawn
> natively only handles non-interactive subprocess (with _tail(),
> get_output(), get_status() etc), and the subclass does everything else
> (read_up_to_prompt(), get_command_status_output() etc).  ssh_login()
> can remain an external function that creates and returns a kvm_spawn
> object.
> This will have to be done carefully because each 'user' of the kvm_spawn
> server needs a named pipe of its own, which will have to be handled by
> the constructor.
> If you think this is a good idea I'd rather make the necessary changes
> to kvm_subprocess myself.

Sounds good to me, I am totally OK with it.

> Does this make sense to you, or did I misunderstand what you meant by
> writing an SSH subclass?

No, you've nailed it. Sorry for the delay in answering.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux