commit b29daa4b577667bd1dd8e1e6fd6f225c975114a5 Author: Jan Tluka jtluka@redhat.com Date: Fri Jun 1 16:10:21 2012 +0200
Let count of packets in PktgenTx test be configurable
This patch lets user configure the count of packets to sent by pktgen facility. The default behaviour has not been changed.
Tests/TestPktgenTx.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- diff --git a/Tests/TestPktgenTx.py b/Tests/TestPktgenTx.py index 5ec500f..792a991 100644 --- a/Tests/TestPktgenTx.py +++ b/Tests/TestPktgenTx.py @@ -58,6 +58,7 @@ class TestPktgenTx(TestGeneric): hwaddr = self.get_mopt("hwaddr") vlan_tci = self.get_opt("vlan_tci", default=0) skb_clone = self.get_opt("skb_clone", default=100000) + count = self.get_opt("count", default=10000000)
exec_cmd("modprobe pktgen")
@@ -74,7 +75,7 @@ class TestPktgenTx(TestGeneric): pg.set("dst_mac %s" % hwaddr) if vlan_tci: pg.set("vlan_id %d" % vlan_tci) - pg.set("count 10000000") + pg.set("count %d" % count) pgctl.set("start") except ExecCmdFail: return self.set_fail("pktgen failed")
lnst-developers@lists.fedorahosted.org