public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: David Huff <dhuff@redhat.com>
Cc: kvm@vger.kernel.org, Michael Goldish <mgoldish@redhat.com>
Subject: Re: [KVM_AUTOTEST] unattended installs take 2
Date: Mon, 22 Jun 2009 13:01:07 -0300	[thread overview]
Message-ID: <1245686467.2906.119.camel@freedom> (raw)
In-Reply-To: <4A3F8386.5060709@redhat.com>

On Mon, 2009-06-22 at 09:13 -0400, David Huff wrote: 
> Lucas Meneghel Rodrigues wrote:
> > I've been trough the changes, thank you for your work David:
> > Comments/questions:
> > 
> >  * Any particular reason why you guys wrote the PXE boot setup as a
> > shell script instead of a python module (that could be also used as a
> > stand alone program)? 
> 
> We decided to use environmental scripts to set up any host specific 
> prerequisite priour to execution any tests.  This way there would be a 
> standard/preferred way for tests to set up a specific environment on the 
> host.
> 
> I am including a snippet form a previous email explaining why we went 
> down this path...
> 
> Michael Goldish wrote:
>  > The solution I had in mind was to add pre/post-processor parameters 
> 'pre_command' and 'post_command' that represent shell commands to be 
> executed before/after the test. A typical shell command would be one 
> that runs an environment specific script that sets up mount points or 
> whatever is needed for the test. This parameter would be provided for 
> each test (in the config file) so one can 'variant' on it, to make 
> different variants of the test (e.g. 'dbench' with local storage, and 
> then with NFS storage, ...). There can also be pre/post-processing 
> scripts for the entire job, that run before the first test and after the 
> last one.

I agree to the reasoning made here in general, but ultimately we do have
to maintain all external scripts. On the coding style document:

http://autotest.kernel.org/browser/trunk/CODING_STYLE

"Please use Python where possible. It's not the ideal language for
everything, but it's pretty good, and consistency goes a long way in
making the project maintainable. (Obviously using C or whatever for
writing tests is fine)."

This particular case (environment setup) is not a reason good enough to
break this principle - we are doing high level stuff, so it ends up
being the same coding it in python or shell script, and in such cases,
the general principle says we should go python.

> > If you use a setup_<testname> function you require the user to change 
> kvm-autotest code in order to perform environment specific setup (and 
> you also limit the user to python). I personally prefer to leave all 
> environment specific stuff in external scripts outside the code, but I 
> may be wrong.

See comment above. Limiting the choice of languages here is good
maintainability wise, and it's compliant with the upstream guidelines.

Good to stress at this point that I have nothing against shell, perl,
ruby and other fine languages (I actually like them). This is just an
attempt to be consistent.


  reply	other threads:[~2009-06-22 16:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 21:50 [KVM_AUTOTEST] unattended installs take 2 David Huff
2009-06-18 21:50 ` [PATCH] Added floppy and tftp options to qemu command David Huff
2009-06-18 21:50 ` [PATCH] modified config file to run unattended install David Huff
2009-06-18 21:50 ` [PATCH] added unattended.sh script David Huff
2009-06-28 11:15   ` Uri Lublin
2009-06-18 21:50 ` [PATCH] Added two sample unattended config files, Fedora and Windows David Huff
2009-06-19  7:07   ` Yaniv Kaul
2009-06-28 10:14   ` Uri Lublin
2009-06-18 21:51 ` [PATCH] Modified boot test in kvm_test.py David Huff
2009-06-19  7:01 ` [KVM_AUTOTEST] unattended installs take 2 Yaniv Kaul
2009-06-22  5:10 ` Lucas Meneghel Rodrigues
2009-06-22 13:13   ` David Huff
2009-06-22 16:01     ` Lucas Meneghel Rodrigues [this message]
     [not found] <1035849725.309381245651514146.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-22  6:20 ` Michael Goldish
2009-06-22 12:45   ` 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=1245686467.2906.119.camel@freedom \
    --to=lmr@redhat.com \
    --cc=dhuff@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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