From patchwork Fri Jun 18 00:14:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 106770 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5I0F2ma015806 for ; Fri, 18 Jun 2010 00:15:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757389Ab0FRAOy (ORCPT ); Thu, 17 Jun 2010 20:14:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41146 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756911Ab0FRAOx (ORCPT ); Thu, 17 Jun 2010 20:14:53 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5I0EqJv004133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 17 Jun 2010 20:14:52 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5I0Eneg005516; Thu, 17 Jun 2010 20:14:50 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5I0EljH005733; Thu, 17 Jun 2010 20:14:48 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH 01/18] KVM test: kvm_preprocessing.py: allow modifying VM params without restarting Date: Fri, 18 Jun 2010 03:14:18 +0300 Message-Id: <1276820075-31310-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 18 Jun 2010 00:15:02 +0000 (UTC) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index ee3e9b2..17f3a29 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -79,8 +79,13 @@ def preprocess_vm(test, params, env, name): "restarting it...") start_vm = True - if start_vm and not vm.create(name, params, test.bindir, for_migration): - raise error.TestError("Could not start VM") + if start_vm: + # Start the VM (or restart it if it's already up) + if not vm.create(name, params, test.bindir, for_migration): + raise error.TestError("Could not start VM") + else: + # Don't start the VM, just update its params + vm.params = params scrdump_filename = os.path.join(test.debugdir, "pre_%s.ppm" % name) try: