From 1284885c201f3b81afb63861d2e79621718ea4b9 Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Tue, 26 Feb 2013 14:46:35 +0000 Subject: [PATCH] netperf: stop tcpdump process during performance testing This patch was wrongly dropped in original refactor. Tcpdump brings extra latency, it causes the guest to batch more bytes per packet. We should stop tcpdump to drop the effect, it will be restarted at the beginning of next case. Reported-by: Wenli Quan Signed-off-by: Amos Kong Acked-by: Wenli Quan --- tests/netperf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/netperf.py b/tests/netperf.py index 049b7f1a..999b5233 100644 --- a/tests/netperf.py +++ b/tests/netperf.py @@ -207,6 +207,14 @@ def run_netperf(test, params, env): username = params_tmp["username"] env_setup(i, ip_dict[i], username, shell_port, password) + if "tcpdump" in env and env["tcpdump"].is_alive(): + # Stop the background tcpdump process + try: + logging.debug("Stopping the background tcpdump") + env["tcpdump"].close() + except Exception: + pass + error.context("Start netperf testing", logging.info) start_test(server_ip, server_ctl, host, clients, test.resultsdir, l=int(params.get('l')), -- GitLab