KVM test: make use of tcpdump optional

To disable tcpdump, set 'run_tcpdump = no' in a config file.
If 'run_tcpdump' isn't set at all, it defaults to 'yes'.

(Currently TAP mode cannot be used without tcpdump.)

Signed-off-by: Michael Goldish <mgoldish@redhat.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@4562 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index 4b9290c..318bf3f 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -196,7 +196,7 @@
     if "tcpdump" in env and not env["tcpdump"].is_alive():
         env["tcpdump"].close()
         del env["tcpdump"]
-    if "tcpdump" not in env:
+    if "tcpdump" not in env and params.get("run_tcpdump", "yes") == "yes":
         command = "/usr/sbin/tcpdump -npvi any 'dst port 68'"
         logging.debug("Starting tcpdump (%s)...", command)
         env["tcpdump"] = kvm_subprocess.kvm_tail(