summaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2016-09-12 06:53:54 -0400
committerJun Li <matthew.lijun@huawei.com>2016-09-18 01:56:13 +0000
commitd86b5521cb07ae8712f908b7c23b6a15371e6ea7 (patch)
tree81d5c52f8225df941db848a2f4cde713c0bcfe70 /yardstick
parent692f3223c53d43686fa660456a34703f2e0a756c (diff)
add ping6 parameters
JIRA: YARDSTICK-315 1) make packetsize workable 2) add ping_count parameter Change-Id: Ice2235fc5744b94df6a3f981c23159ca8280d876 Signed-off-by: MatthewLi <matthew.lijun@huawei.com> (cherry picked from commit 212a60535c5a84efcf236110caa0aa83499aefe2)
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/benchmark/scenarios/networking/ping6.py12
-rw-r--r--yardstick/benchmark/scenarios/networking/ping6_benchmark.bash3
2 files changed, 13 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/networking/ping6.py b/yardstick/benchmark/scenarios/networking/ping6.py
index e68756462..dc896b2c6 100644
--- a/yardstick/benchmark/scenarios/networking/ping6.py
+++ b/yardstick/benchmark/scenarios/networking/ping6.py
@@ -39,6 +39,7 @@ class Ping6(base.Scenario): # pragma: no cover
self.context_cfg = context_cfg
self.setup_done = False
self.run_done = False
+ self.ping_options = ''
def _pre_setup(self):
for node_name in self.host_list:
@@ -83,6 +84,10 @@ class Ping6(base.Scenario): # pragma: no cover
Ping6.RADVD_SCRIPT)
options = self.scenario_cfg['options']
+ self.ping_options = "-s %s" % \
+ options.get("packetsize", '56') + \
+ "-c %s" % \
+ options.get("ping_count", '5')
host_str = options.get("host", 'host1')
self.host_list = host_str.split(',')
self.host_list.sort()
@@ -126,6 +131,10 @@ class Ping6(base.Scenario): # pragma: no cover
if not self.setup_done:
options = self.scenario_cfg['options']
+ self.ping_options = "-s %s" % \
+ options.get("packetsize", '56') + \
+ "-c %s" % \
+ options.get("ping_count", '5')
host_str = options.get("host", 'host1')
self.host_list = host_str.split(',')
self.host_list.sort()
@@ -149,7 +158,8 @@ class Ping6(base.Scenario): # pragma: no cover
# run ping6 benchmark
self.client.run("cat > ~/ping6.sh",
stdin=open(self.ping6_script, "rb"))
- cmd = "sudo bash ping6.sh"
+ cmd_args = "%s" % (self.ping_options)
+ cmd = "sudo bash ping6.sh %s" % (cmd_args)
LOG.debug("Executing command: %s", cmd)
status, stdout, stderr = self.client.execute(cmd)
diff --git a/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash b/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
index 16cb0f07e..9a08b098a 100644
--- a/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
+++ b/yardstick/benchmark/scenarios/networking/ping6_benchmark.bash
@@ -11,6 +11,7 @@
# Run a single ping6 command towards a ipv6 router
set -e
+ping6_options=$1
source /opt/admin-openrc.sh
chmod 600 vRouterKey
# TODO find host
@@ -29,4 +30,4 @@ wait_vm_ok() {
}
wait_vm_ok
sleep 360
-sudo ip netns exec qdhcp-$(neutron net-list | grep -w ipv4-int-network1 | awk '{print $2}') ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vRouterKey fedora@20.0.0.4 "ping6 -c 1 2001:db8:0:1::1 | grep ttl | awk -F [=\ ] '{printf \$10}'" \ No newline at end of file
+sudo ip netns exec qdhcp-$(neutron net-list | grep -w ipv4-int-network1 | awk '{print $2}') ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vRouterKey fedora@20.0.0.4 "ping6 $ping6_options 2001:db8:0:1::1 | grep rtt | awk -F [\/\ ] '{printf \$8}'"