From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org
Subject: [PATCH 3/5] KVM test: virt_env_process: Setup private bridge during postprocessing
Date: Tue, 24 May 2011 04:03:18 -0300 [thread overview]
Message-ID: <1306220600-3840-4-git-send-email-lmr@redhat.com> (raw)
In-Reply-To: <1306220600-3840-1-git-send-email-lmr@redhat.com>
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 <lmr@redhat.com>
---
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.1
next prev parent reply other threads:[~2011-05-24 7:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 7:03 [PATCH 0/5] Setup private bridge in KVM autotest, get rid of ifup scripts Lucas Meneghel Rodrigues
2011-05-24 7:03 ` [PATCH 1/5] KVM test: Adding framework code to control bridge creation Lucas Meneghel Rodrigues
2011-05-24 7:03 ` [PATCH 2/5] KVM test: Add helpers to control the TAP/bridge Lucas Meneghel Rodrigues
2011-05-24 7:03 ` Lucas Meneghel Rodrigues [this message]
2011-05-24 7:03 ` [PATCH 4/5] KVM test: setup tap fd and pass it to qemu-kvm v3 Lucas Meneghel Rodrigues
2011-05-24 7:03 ` [PATCH 5/5] KVM test: Changing KVM autotest default to private bridge Lucas Meneghel Rodrigues
-- strict thread matches above, loose matches on Subject: below --
2011-06-02 4:23 [PATCH 0/5] Create private bridge, get rid of qemu ifup scripts v3 Lucas Meneghel Rodrigues
2011-06-02 4:23 ` [PATCH 3/5] KVM test: virt_env_process: Setup private bridge during postprocessing Lucas Meneghel Rodrigues
2011-05-21 4:23 [PATCH 0/5] Setup private bridge in KVM autotest, get rid of ifup scripts Lucas Meneghel Rodrigues
2011-05-21 4:23 ` [PATCH 3/5] KVM test: virt_env_process: Setup private bridge during postprocessing 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=1306220600-3840-4-git-send-email-lmr@redhat.com \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=kvm@vger.kernel.org \
/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