From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Michael Goldish <mgoldish@redhat.com>
Cc: lookkas@gmail.com, autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [Autotest] Adding kvm_subprocess
Date: Wed, 01 Jul 2009 11:01:46 -0300 [thread overview]
Message-ID: <1246456906.14963.4.camel@freedom> (raw)
In-Reply-To: <36016862.218871245338828210.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
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.
next prev parent reply other threads:[~2009-07-01 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1252456106.218811245338800014.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-18 15:27 ` [Autotest] Adding kvm_subprocess Michael Goldish
2009-07-01 14:01 ` Lucas Meneghel Rodrigues [this message]
2009-06-18 11:58 Michael Goldish
2009-06-18 13:52 ` [Autotest] " Lucas Meneghel Rodrigues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246456906.14963.4.camel@freedom \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=lookkas@gmail.com \
--cc=mgoldish@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox