From patchwork Mon Dec 20 16:57:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Meneghel Rodrigues X-Patchwork-Id: 422401 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBL0RA9R011307 for ; Tue, 21 Dec 2010 00:31:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933230Ab0LTU7K (ORCPT ); Mon, 20 Dec 2010 15:59:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45759 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933048Ab0LTU7J (ORCPT ); Mon, 20 Dec 2010 15:59:09 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBKKx7kD029732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Dec 2010 15:59:08 -0500 Received: from autotest.virt.bos.redhat.com (autotest.virt.bos.redhat.com [10.16.72.47]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBKKx7NR021469; Mon, 20 Dec 2010 15:59:07 -0500 From: Lucas Meneghel Rodrigues To: autotest@test.kernel.org Cc: kvm@vger.kernel.org, Lucas Meneghel Rodrigues Subject: [PATCH 1/5] KVM test: Include the preprocessing param migration_mode Date: Mon, 20 Dec 2010 11:57:30 -0500 Message-Id: <1292864254-6782-1-git-send-email-lmr@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 00:31:16 +0000 (UTC) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py index 5ec38fb..d2f94cd 100644 --- a/client/tests/kvm/kvm_preprocessing.py +++ b/client/tests/kvm/kvm_preprocessing.py @@ -60,6 +60,8 @@ def preprocess_vm(test, params, env, name): start_vm = False + migration_mode = params.get("migration_mode", None) + if params.get("restart_vm") == "yes": logging.debug("'restart_vm' specified; (re)starting VM...") start_vm = True @@ -72,11 +74,19 @@ def preprocess_vm(test, params, env, name): logging.debug("VM's qemu command differs from requested one; " "restarting it...") start_vm = True + elif migration_mode is not None: + logging.debug("Starting VM on migration incoming mode...") + start_vm = True if start_vm: - # Start the VM (or restart it if it's already up) - if not vm.create(name, params, test.bindir): - raise error.TestError("Could not start VM") + if migration_mode is not None: + if not vm.create(name, params, test.bindir, + migration_mode=migration_mode): + raise error.TestError("Could not start VM for migration") + else: + # Start the VM (or restart it if it's already up) + if not vm.create(name, params, test.bindir): + raise error.TestError("Could not start VM") else: # Don't start the VM, just update its params vm.params = params