All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Yolkfull Chow <yzhou@redhat.com>
Cc: kvm@vger.kernel.org, Michael Goldish <mgoldish@redhat.com>,
	Uri Lublin <uril@redhat.com>
Subject: Re: [KVM-AUTOTEST PATCH] stress_boot - Boot VMs until one of them becomes unresponsive - Version2
Date: Thu, 18 Jun 2009 05:17:30 -0300	[thread overview]
Message-ID: <1245313050.11036.18.camel@freedom> (raw)
In-Reply-To: <4A3257BC.2080207@redhat.com>

On Fri, 2009-06-12 at 21:27 +0800, Yolkfull Chow wrote:
> Following are the differences between version 1:
> 
> 1) use framework to destroy VMs except the main_vm
> 2) use snapshot to boot other VMs except the first one
> 
> 
> Regards,
> Yolkfull

Hi Yolkfull, Michael and Uri already made a thorough first comment about
your test, and I have a minor thing to note (and I admit I'm being picky
here):

+            # check whether all previous ssh sessions are responsive
+            for i, vm_session in enumerate(sessions):
+                if vm_session.get_command_status(params.get("alive_test_cmd")):
+                    raise error.TestFail("Session #%d is not responsive" % i)
+            num += 1
+
+        except (error.TestFail, OSError):
+            for se in sessions:
+                se.close()
+            logging.info("Total number booted: %d" % num)
+            raise
+    else:
+        for se in sessions:
+            se.close()
+        logging.info("Total number booted: %d" % num)

When the test finishes successfuly, the counter num will be incremented
by one, will break the while condition and later will be used to print
the number of vms successfuly booted. In the end the total number of vms
booted that the test will report is the actual number of vms booted plus
1. To fix this we can either:

 * Just subtract 1 from num at the last info logging call;
 * Remove num initialization and replace the while loop by a

for num in range(1, int(params.get("max_vms")):

this way we don't even need to increment num manually.

It's up to you which one you're going to implement. I have tested your
code and it works fine (aside from the minor cosmetic issue). Once you
send me an updated version, I am going to apply it. 

Thanks for your work!

-- 
Lucas Meneghel Rodrigues
Software Engineer (QE)
Red Hat - Emerging Technologies


  reply	other threads:[~2009-06-18  8:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <120253480.1747631244710010660.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-11  8:53 ` [KVM-AUTOTEST PATCH] A test patch - Boot VMs until one of them becomes unresponsive Michael Goldish
2009-06-11  9:46   ` Yolkfull Chow
2009-06-12 13:27   ` [KVM-AUTOTEST PATCH] stress_boot - Boot VMs until one of them becomes unresponsive - Version2 Yolkfull Chow
2009-06-18  8:17     ` Lucas Meneghel Rodrigues [this message]
2009-06-18  9:16       ` Yolkfull Chow
2009-06-19 13:06         ` 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=1245313050.11036.18.camel@freedom \
    --to=lmr@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mgoldish@redhat.com \
    --cc=uril@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.