Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Uri Lublin <uril@redhat.com>
To: Yolkfull Chow <yzhou@redhat.com>
Cc: Michael Goldish <mgoldish@redhat.com>, kvm@vger.kernel.org
Subject: Re: [Autotest] [PATCH 12/19] KVM test: Add new	module	kvm_test_utils.py
Date: Mon, 14 Sep 2009 10:58:01 +0300	[thread overview]
Message-ID: <4AADF789.9050603@redhat.com> (raw)
In-Reply-To: <20090914052644.GA2476@aFu.nay.redhat.com>

On 09/14/2009 08:26 AM, Yolkfull Chow wrote:
> On Wed, Sep 09, 2009 at 09:12:05PM +0300, Michael Goldish wrote:
>> This module is meant to reduce code size by performing common test procedures.
>> Generally, code here should look like test code.

>> +def wait_for_login(vm, nic_index=0, timeout=240):
>> +    """
>> +    Try logging into a VM repeatedly.  Stop on success or when timeout expires.
>> +
>> +    @param vm: VM object.
>> +    @param nic_index: Index of NIC to access in the VM.
>> +    @param timeout: Time to wait before giving up.
>> +    @return: A shell session object.
>> +    """
>> +    logging.info("Waiting for guest to be up...")
>> +    session = kvm_utils.wait_for(lambda: vm.remote_login(nic_index=nic_index),
>> +                                 timeout, 0, 2)
>> +    if not session:
>> +        raise error.TestFail("Could not log into guest")
>
> Hi Michael, I think we should also add a parameter 'vm_name' for
> wait_for_login(). On the assumption that we boot more than one VMs, it's
> hard to know which guest failed to login according to message above.
> What do you think? :-)
>

The VM object ("vm" parameter) "knows" its own name.
It is a good idea to add that name to log/error messages, since we do want to 
run different tests (VMs) in parallel (although the logs should be also saved in 
different directories/files).

Regards,
     Uri.

  reply	other threads:[~2009-09-14  8:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 18:11 [PATCH 01/19] KVM test: kvm_utils.py: make verify_ip_address_ownership() more robust Michael Goldish
2009-09-09 18:11 ` [PATCH 02/19] KVM test: Migration test cleanup Michael Goldish
2009-09-09 18:11   ` [PATCH 03/19] KVM test: scan_results.py: allow parsing and printing of multiple result files Michael Goldish
2009-09-09 18:11     ` [PATCH 04/19] KVM test: kvm_utils.py: add kill_process_tree() Michael Goldish
2009-09-09 18:11       ` [PATCH 05/19] KVM test: kvm_subprocess: use kill_process_tree() to close child processes Michael Goldish
2009-09-09 18:11         ` [PATCH 06/19] KVM test: timedrift test: set CPU affinity recursively for all children Michael Goldish
2009-09-09 18:12           ` [PATCH 07/19] KVM test: kvm_subprocess: get rid of get_pid() (replace it with get_shell_pid()) Michael Goldish
2009-09-09 18:12             ` [PATCH 08/19] KVM test: remove unused function is_sshd_running() Michael Goldish
2009-09-09 18:12               ` [PATCH 09/19] KVM test: kvm_config.py: remove unused function get_match_block_indices() Michael Goldish
2009-09-09 18:12                 ` [PATCH 10/19] KVM test: boot test: add option to reboot using system_reset Michael Goldish
2009-09-09 18:12                   ` [PATCH 11/19] KVM test: shutdown test: allow shutting down using system_powerdown Michael Goldish
2009-09-09 18:12                     ` [PATCH 12/19] KVM test: Add new module kvm_test_utils.py Michael Goldish
2009-09-09 18:12                       ` [PATCH 13/19] KVM test: kvm_tests.py: save test code by using utilities in kvm_test_utils.py Michael Goldish
2009-09-09 18:12                         ` [PATCH 14/19] KVM test: kvm_preprocessing.py: don't explicitly print failure messages Michael Goldish
2009-09-09 18:12                           ` [PATCH 15/19] KVM test: Autotest test wrapper cleanup Michael Goldish
2009-09-09 18:12                             ` [PATCH 16/19] KVM test: kvm_subprocess: robustify the test for child process termination Michael Goldish
2009-09-09 18:12                               ` [PATCH 17/19] KVM test: kvm_vm.py: add macaddr= to command line only if a MAC address is given Michael Goldish
2009-09-09 18:12                                 ` [PATCH 18/19] KVM test: kvm_tests.cfg.sample: get all Windows test utilities from a single ISO Michael Goldish
2009-09-09 18:12                                   ` [PATCH 19/19] KVM test: kvm_preprocessing.py: verify PPM file validity before passing to PIL Michael Goldish
2009-09-10  3:24                                     ` [Autotest] " Lucas Meneghel Rodrigues
2009-09-10  3:19                                   ` [Autotest] [PATCH 18/19] KVM test: kvm_tests.cfg.sample: get all Windows test utilities from a single ISO Lucas Meneghel Rodrigues
2009-11-24  4:12                                     ` sudhir kumar
2009-09-10  3:16                             ` [Autotest] [PATCH 15/19] KVM test: Autotest test wrapper cleanup Lucas Meneghel Rodrigues
2009-09-14  5:26                       ` [Autotest] [PATCH 12/19] KVM test: Add new module kvm_test_utils.py Yolkfull Chow
2009-09-14  7:58                         ` Uri Lublin [this message]
2009-09-14  8:40                           ` Yolkfull Chow
2009-09-10  3:25 ` [Autotest] [PATCH 01/19] KVM test: kvm_utils.py: make verify_ip_address_ownership() more robust Lucas Meneghel Rodrigues
     [not found] <857145908.38101252917938768.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-09-14  8:46 ` [Autotest] [PATCH 12/19] KVM test: Add new module kvm_test_utils.py Michael Goldish

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=4AADF789.9050603@redhat.com \
    --to=uril@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mgoldish@redhat.com \
    --cc=yzhou@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