From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: [PATCH 3/5] KVM test: virt_env_process: Setup private bridge during postprocessing Date: Thu, 2 Jun 2011 01:23:07 -0300 Message-ID: <1306988589-17085-4-git-send-email-lmr@redhat.com> References: <1306988589-17085-1-git-send-email-lmr@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: autotest@test.kernel.org Return-path: In-Reply-To: <1306988589-17085-1-git-send-email-lmr@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autotest-bounces@test.kernel.org Errors-To: autotest-bounces@test.kernel.org List-Id: kvm.vger.kernel.org Call bridge setup at preprocessing and cleanup at postprocessing. The bridge can be cleaned up when no tap interfaces are using it. Signed-off-by: Lucas Meneghel Rodrigues --- client/virt/virt_env_process.py | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py index 625b422..1742a02 100644 --- a/client/virt/virt_env_process.py +++ b/client/virt/virt_env_process.py @@ -196,6 +196,11 @@ def preprocess(test, params, env): @param env: The environment (a dict-like object). """ error.context("preprocessing") + + if params.get("bridge") == "private": + brcfg = virt_test_setup.PrivateBridgeConfig(params) + brcfg.setup() + # Start tcpdump if it isn't already running if "address_cache" not in env: env["address_cache"] = {} @@ -365,6 +370,10 @@ def postprocess(test, params, env): int(params.get("post_command_timeout", "600")), params.get("post_command_noncritical") == "yes") + if params.get("bridge") == "private": + brcfg = virt_test_setup.PrivateBridgeConfig() + brcfg.cleanup() + def postprocess_on_error(test, params, env): """ -- 1.7.5.2