[PATCH 01/10] Task: add set_parameter(s) and set_tag methods
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Methods for adding parameters were missing from the PerfRepoResult
class, this commit fixes that.
Same goes for the set_tag method that sets a single tag instead of a
list of tags.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index f2ee4e0..e8db95f 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -546,9 +546,19 @@ class PerfRepoResult(object):
for pair in list_to_dot(mapping, "mapping.", "machine"):
self._testExecution.add_parameter(pair[0], pair[1])
+ def set_tag(self, tag):
+ self._testExecution.add_tag(tag)
+
def set_tags(self, tags):
for tag in tags:
- self._testExecution.add_tag(tag)
+ self.set_tag(tag)
+
+ def set_parameter(self, name, value):
+ self._testExecution.add_parameter(name, value)
+
+ def set_parameters(self, params):
+ for name, value in params:
+ self.set_parameter(name, value)
def get_testExecution(self):
return self._testExecution
--
2.1.0
8 years, 6 months
[lnst] MOVE git to github
by Jiří Pírko
commit 52aa8990eb4c14c0e0e1606ba633f997a524ea86
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Wed May 27 15:39:16 2015 +0200
MOVE git to github
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
COPYING | 339 -------
MANIFEST.in | 6 -
README.md | 43 -
dist/lnst-slave | 105 --
dist/lnst-slave.service | 12 -
install/lnst-ctl.1.in | 150 ---
install/lnst-ctl.bash | 89 --
install/lnst-ctl.conf.in | 63 --
install/lnst-slave.1.in | 103 --
install/lnst-slave.bash | 38 -
install/lnst-slave.conf.in | 34 -
lnst-ctl | 351 -------
lnst-ctl.conf | 19 -
lnst-pool-wizard | 66 --
lnst-slave | 98 --
lnst-slave.conf | 10 -
lnst/Common/Colours.py | 191 ----
lnst/Common/Config.py | 328 -------
lnst/Common/ConnectionHandler.py | 149 ---
lnst/Common/Daemon.py | 94 --
lnst/Common/ExecCmd.py | 70 --
lnst/Common/LoggingHandler.py | 87 --
lnst/Common/Logs.py | 252 -----
lnst/Common/NetTestCommand.py | 546 -----------
lnst/Common/NetUtils.py | 154 ---
lnst/Common/PacketCapture.py | 64 --
lnst/Common/ProcessManager.py | 94 --
lnst/Common/RecipePath.py | 155 ---
lnst/Common/ResourceCache.py | 146 ---
lnst/Common/ShellProcess.py | 306 ------
lnst/Common/TestsCommon.py | 139 ---
lnst/Common/Utils.py | 246 -----
lnst/Controller/Machine.py | 997 --------------------
lnst/Controller/MessageDispatcherLite.py | 66 --
lnst/Controller/NetTestController.py | 906 ------------------
lnst/Controller/NetTestResultSerializer.py | 291 ------
lnst/Controller/PerfRepo.py | 532 -----------
lnst/Controller/RecipeParser.py | 468 ---------
lnst/Controller/SlaveMachineParser.py | 70 --
lnst/Controller/SlavePool.py | 630 ------------
lnst/Controller/Task.py | 554 -----------
lnst/Controller/VirtUtils.py | 263 -----
lnst/Controller/Wizard.py | 207 ----
lnst/Controller/XmlParser.py | 185 ----
lnst/Controller/XmlProcessing.py | 236 -----
lnst/Controller/XmlTemplates.py | 428 ---------
lnst/Slave/InterfaceManager.py | 486 ----------
lnst/Slave/NetConfigCommon.py | 114 ---
lnst/Slave/NetConfigDevice.py | 513 ----------
lnst/Slave/NetTestSlave.py | 875 -----------------
lnst/Slave/NmConfigDevice.py | 861 -----------------
misc/recipe_conv.py | 134 ---
obsolete/SwSwitch/SwSwitch.py | 387 --------
obsolete/Switch/Drivers/SwSwitch.py | 49 -
obsolete/Switch/SwitchConfigParse.py | 73 --
obsolete/Switch/SwitchCtl.py | 42 -
obsolete/Switch/SwitchDriversCommon.py | 51 -
obsolete/netconfig.py | 206 ----
obsolete/switchconfig.py | 87 --
obsolete/swswitch.py | 90 --
recipes/examples/netem/corruption.xml | 39 -
recipes/examples/netem/delay.xml | 43 -
recipes/examples/netem/duplication.xml | 39 -
recipes/examples/netem/loss.xml | 39 -
recipes/examples/netem/netem_test.py | 41 -
recipes/examples/netem/reordering.xml | 49 -
recipes/examples/ovs/ovs_vlan.xml | 145 ---
recipes/examples/quick_guides/bonding.xml | 40 -
recipes/examples/quick_guides/iperf.xml | 43 -
.../quick_guides/netperf/netperf_sctp_rr.xml | 41 -
.../quick_guides/netperf/netperf_sctp_stream.xml | 41 -
.../netperf/netperf_sctp_stream_many.xml | 41 -
.../quick_guides/netperf/netperf_tcp_rr.xml | 41 -
.../quick_guides/netperf/netperf_tcp_stream.xml | 41 -
.../quick_guides/netperf/netperf_udp_rr.xml | 41 -
.../quick_guides/netperf/netperf_udp_stream.xml | 41 -
recipes/examples/quick_guides/ping_check.xml | 37 -
recipes/examples/quick_guides/vlan.xml | 49 -
recipes/multicast/cmd_sequences/block_source.xml | 77 --
recipes/multicast/cmd_sequences/if.xml | 76 --
recipes/multicast/cmd_sequences/loop.xml | 69 --
recipes/multicast/cmd_sequences/max_groups.xml | 22 -
recipes/multicast/cmd_sequences/membership.xml | 47 -
recipes/multicast/cmd_sequences/simple.xml | 30 -
.../multicast/cmd_sequences/source_membership.xml | 81 --
recipes/multicast/cmd_sequences/ttl.xml | 111 ---
recipes/multicast/multicast-all.xml | 45 -
recipes/regression_tests/phase1/3_vlans.README | 45 -
recipes/regression_tests/phase1/3_vlans.py | 150 ---
recipes/regression_tests/phase1/3_vlans.xml | 92 --
.../phase1/3_vlans_over_active_backup_bond.README | 54 --
.../phase1/3_vlans_over_active_backup_bond.xml | 106 ---
.../regression_tests/phase1/3_vlans_over_bond.py | 152 ---
.../phase1/3_vlans_over_round_robin_bond.README | 54 --
.../phase1/3_vlans_over_round_robin_bond.xml | 106 ---
.../phase1/active_backup_bond.README | 51 -
.../regression_tests/phase1/active_backup_bond.xml | 40 -
.../phase1/active_backup_double_bond.README | 51 -
.../phase1/active_backup_double_bond.xml | 50 -
recipes/regression_tests/phase1/bonding_test.py | 118 ---
recipes/regression_tests/phase1/ping_flood.README | 38 -
recipes/regression_tests/phase1/ping_flood.xml | 29 -
.../phase1/round_robin_bond.README | 51 -
.../regression_tests/phase1/round_robin_bond.xml | 42 -
.../phase1/round_robin_double_bond.README | 51 -
.../phase1/round_robin_double_bond.xml | 50 -
recipes/regression_tests/phase1/simple_ping.py | 40 -
...l_bridge_2_vlans_over_active_backup_bond.README | 76 --
...tual_bridge_2_vlans_over_active_backup_bond.xml | 160 ----
.../phase1/virtual_bridge_2_vlans_over_bond.py | 189 ----
.../phase1/virtual_bridge_vlan_in_guest.README | 52 -
.../phase1/virtual_bridge_vlan_in_guest.py | 121 ---
.../phase1/virtual_bridge_vlan_in_guest.xml | 62 --
.../phase1/virtual_bridge_vlan_in_host.README | 52 -
.../phase1/virtual_bridge_vlan_in_host.py | 118 ---
.../phase1/virtual_bridge_vlan_in_host.xml | 62 --
.../phase2/3_vlans_over_active_backup_team.xml | 112 ---
.../phase2/3_vlans_over_round_robin_team.xml | 112 ---
.../regression_tests/phase2/3_vlans_over_team.py | 154 ---
.../phase2/active_backup_double_team.xml | 60 --
.../regression_tests/phase2/active_backup_team.xml | 46 -
.../active_backup_team_vs_active_backup_bond.xml | 60 --
.../active_backup_team_vs_round_robin_bond.xml | 60 --
.../phase2/round_robin_double_team.xml | 64 --
.../regression_tests/phase2/round_robin_team.xml | 46 -
.../round_robin_team_vs_active_backup_bond.xml | 60 --
.../round_robin_team_vs_round_robin_bond.xml | 56 --
recipes/regression_tests/phase2/team_test.py | 208 ----
...s_bridge_2_vlans_over_active_backup_bond.README | 77 --
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 191 ----
..._ovs_bridge_2_vlans_over_active_backup_bond.xml | 122 ---
.../phase2/virtual_ovs_bridge_vlan_in_guest.README | 55 --
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 120 ---
.../phase2/virtual_ovs_bridge_vlan_in_guest.xml | 59 --
.../phase2/virtual_ovs_bridge_vlan_in_host.README | 58 --
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 117 ---
.../phase2/virtual_ovs_bridge_vlan_in_host.xml | 57 --
recipes/smoke/generate-recipes.py | 110 ---
recipes/smoke/lib/conf-bond.xml | 13 -
recipes/smoke/lib/conf-eth.xml | 7 -
recipes/smoke/lib/conf-netem.xml | 42 -
recipes/smoke/lib/conf-team.xml | 20 -
recipes/smoke/lib/conf-vlan.xml | 14 -
recipes/smoke/lib/recipe-temp.xml | 17 -
recipes/smoke/lib/task-bg.xml | 12 -
recipes/smoke/lib/task-config.xml | 10 -
recipes/smoke/lib/task-exec-from.xml | 12 -
recipes/smoke/lib/task-exec.xml | 6 -
recipes/smoke/lib/task-ping.xml | 10 -
recipes/smoke/lib/variables.conf | 18 -
recipes/team/interfaces/interfaces-bond_lacp.xml | 20 -
.../interfaces/interfaces-br_queue_mapping.xml | 18 -
recipes/team/interfaces/interfaces-simple.xml | 10 -
recipes/team/interfaces/interfaces-simple_br.xml | 16 -
recipes/team/interfaces/interfaces-simple_vlan.xml | 15 -
recipes/team/interfaces/interfaces-team_ab.xml | 50 -
.../team/interfaces/interfaces-team_ab_lw_001.xml | 25 -
.../team/interfaces/interfaces-team_ab_lw_002.xml | 60 --
.../team/interfaces/interfaces-team_ab_lw_003.xml | 31 -
.../team/interfaces/interfaces-team_ab_lw_004.xml | 68 --
.../team/interfaces/interfaces-team_ab_lw_005.xml | 30 -
.../team/interfaces/interfaces-team_ab_lw_006.xml | 65 --
.../team/interfaces/interfaces-team_ab_lw_007.xml | 64 --
.../team/interfaces/interfaces-team_ab_lw_008.xml | 90 --
.../team/interfaces/interfaces-team_ab_vlan.xml | 58 --
recipes/team/interfaces/interfaces-team_bcast.xml | 24 -
.../team/interfaces/interfaces-team_bcast_vlan.xml | 32 -
recipes/team/interfaces/interfaces-team_lacp.xml | 38 -
.../team/interfaces/interfaces-team_lacp_act.xml | 41 -
.../interfaces/interfaces-team_lacp_act_vlan.xml | 49 -
.../interfaces/interfaces-team_lacp_passive.xml | 38 -
.../interfaces/interfaces-team_lacp_slowrate.xml | 38 -
.../team/interfaces/interfaces-team_lacp_vlan.xml | 46 -
recipes/team/interfaces/interfaces-team_lb.xml | 27 -
recipes/team/interfaces/interfaces-team_lb_act.xml | 30 -
.../interfaces/interfaces-team_lb_act_vlan.xml | 38 -
.../team/interfaces/interfaces-team_lb_vlan.xml | 36 -
recipes/team/interfaces/interfaces-team_rr.xml | 24 -
.../interfaces-team_rr_queue_mapping.xml | 50 -
.../team/interfaces/interfaces-team_rr_vlan.xml | 32 -
recipes/team/recipex_ab_001.xml | 21 -
recipes/team/recipex_ab_002.xml | 34 -
recipes/team/recipex_ab_003.xml | 19 -
recipes/team/recipex_ab_004.xml | 19 -
recipes/team/recipex_ab_005.xml | 24 -
recipes/team/recipex_ab_vlan_004.xml | 19 -
recipes/team/recipex_bcast_001.xml | 19 -
recipes/team/recipex_bcast_002.xml | 34 -
recipes/team/recipex_bcast_003.xml | 19 -
recipes/team/recipex_bcast_004.xml | 19 -
recipes/team/recipex_bcast_005.xml | 22 -
recipes/team/recipex_bcast_vlan_004.xml | 19 -
recipes/team/recipex_lacp_001.xml | 19 -
recipes/team/recipex_lacp_002.xml | 34 -
recipes/team/recipex_lacp_003.xml | 19 -
recipes/team/recipex_lacp_004.xml | 19 -
recipes/team/recipex_lacp_005.xml | 22 -
recipes/team/recipex_lacp_act_001.xml | 19 -
recipes/team/recipex_lacp_act_002.xml | 34 -
recipes/team/recipex_lacp_act_003.xml | 19 -
recipes/team/recipex_lacp_act_004.xml | 19 -
recipes/team/recipex_lacp_act_005.xml | 22 -
recipes/team/recipex_lacp_act_vlan_004.xml | 19 -
recipes/team/recipex_lacp_vlan_004.xml | 19 -
recipes/team/recipex_lb_001.xml | 19 -
recipes/team/recipex_lb_002.xml | 34 -
recipes/team/recipex_lb_003.xml | 19 -
recipes/team/recipex_lb_004.xml | 19 -
recipes/team/recipex_lb_005.xml | 22 -
recipes/team/recipex_lb_act_001.xml | 19 -
recipes/team/recipex_lb_act_002.xml | 34 -
recipes/team/recipex_lb_act_003.xml | 19 -
recipes/team/recipex_lb_act_004.xml | 19 -
recipes/team/recipex_lb_act_005.xml | 22 -
recipes/team/recipex_lb_act_vlan_004.xml | 19 -
recipes/team/recipex_lb_vlan_004.xml | 19 -
recipes/team/recipex_rr_001.xml | 19 -
recipes/team/recipex_rr_002.xml | 34 -
recipes/team/recipex_rr_003.xml | 19 -
recipes/team/recipex_rr_004.xml | 19 -
recipes/team/recipex_rr_005.xml | 22 -
recipes/team/recipex_rr_vlan_004.xml | 19 -
recipes/team/recipey_ab_lw_001.xml | 19 -
recipes/team/recipey_ab_lw_002.xml | 19 -
recipes/team/recipey_ab_lw_003.xml | 19 -
recipes/team/recipey_ab_lw_004.xml | 19 -
recipes/team/recipey_ab_lw_005.xml | 19 -
recipes/team/recipey_ab_lw_006.xml | 19 -
recipes/team/recipey_ab_lw_007.xml | 19 -
recipes/team/recipey_ab_lw_008.xml | 19 -
recipes/team/recipey_lacp_act_flows.xml | 19 -
recipes/team/recipey_lacp_hashes.xml | 19 -
recipes/team/recipey_lacp_passive.xml | 19 -
recipes/team/recipey_lacp_slowrate.xml | 19 -
recipes/team/recipey_lb_act_flows.xml | 19 -
recipes/team/recipey_lb_hashes.xml | 19 -
recipes/team/recipey_rr_queue_mapping.xml | 19 -
recipes/team/tasks/sequence_iperf.xml | 18 -
recipes/team/tasks/sequence_ping_simple.xml | 19 -
recipes/team/tasks/sequence_pktgen.xml | 21 -
recipes/team/tasks/sequence_pktgen_flows.xml | 22 -
recipes/team/tasks/sequence_pktgen_hashes.xml | 14 -
recipes/team/tasks/sequence_pktgen_lacp.xml | 21 -
recipes/team/tasks/sequence_queue_mapping.xml | 43 -
recipes/team/tasks/sequence_tcp_connections.xml | 59 --
regression-tests/README.md | 112 ---
regression-tests/env/lnst-ctl.conf | 14 -
regression-tests/run-test.sh | 252 -----
regression-tests/tests/0/desc | 6 -
regression-tests/tests/0/run.sh | 24 -
regression-tests/tests/1/desc | 4 -
regression-tests/tests/1/recipe.xml | 33 -
regression-tests/tests/1/run.sh | 12 -
regression-tests/tests/10/desc | 4 -
regression-tests/tests/10/prefix-check-taskapi.xml | 33 -
regression-tests/tests/10/prefix-check.py | 15 -
regression-tests/tests/10/prefix-check.xml | 44 -
regression-tests/tests/10/run.sh | 39 -
regression-tests/tests/11/desc | 3 -
regression-tests/tests/11/recipe.xml | 33 -
regression-tests/tests/11/run.sh | 15 -
regression-tests/tests/12/desc | 1 -
regression-tests/tests/12/run.sh | 12 -
regression-tests/tests/12/sm01.xml | 7 -
regression-tests/tests/12/sm02.xml | 7 -
regression-tests/tests/12/xinclude-check.xml | 13 -
regression-tests/tests/13/desc | 1 -
regression-tests/tests/13/run.sh | 22 -
regression-tests/tests/13/taskapi-alias-check.py | 9 -
regression-tests/tests/13/taskapi-alias-check.xml | 38 -
.../tests/13/taskapi-alias-namespace-check.py | 8 -
.../tests/13/taskapi-alias-namespace-check.xml | 41 -
regression-tests/tests/14/desc | 3 -
regression-tests/tests/14/recipe1.xml | 68 --
regression-tests/tests/14/recipe2.xml | 79 --
regression-tests/tests/14/run.sh | 17 -
regression-tests/tests/15/desc | 3 -
regression-tests/tests/15/recipe.xml | 33 -
regression-tests/tests/15/run.sh | 12 -
regression-tests/tests/16/desc | 3 -
regression-tests/tests/16/recipe.xml | 37 -
regression-tests/tests/16/run.sh | 14 -
regression-tests/tests/17/desc | 3 -
regression-tests/tests/17/recipe.xml | 38 -
regression-tests/tests/17/run.sh | 14 -
regression-tests/tests/18/desc | 6 -
regression-tests/tests/18/recipe.xml | 26 -
regression-tests/tests/18/run.sh | 19 -
regression-tests/tests/19/desc | 3 -
regression-tests/tests/19/recipe.xml | 17 -
regression-tests/tests/19/run.sh | 19 -
regression-tests/tests/2/desc | 5 -
regression-tests/tests/2/recipe.xml | 74 --
regression-tests/tests/2/run.sh | 12 -
regression-tests/tests/20/desc | 3 -
regression-tests/tests/20/recipe1.xml | 47 -
regression-tests/tests/20/recipe2.xml | 31 -
regression-tests/tests/20/run.sh | 20 -
regression-tests/tests/21/desc | 3 -
regression-tests/tests/21/lnst-ctl.conf | 3 -
regression-tests/tests/21/recipe.xml | 55 --
regression-tests/tests/21/run.sh | 18 -
.../tests/21/test_modules/TCPConnection.py | 60 --
.../tests/21/test_tools/tcp_conn/Makefile | 12 -
.../tests/21/test_tools/tcp_conn/lnst-setup.sh | 3 -
.../tests/21/test_tools/tcp_conn/tcp_connect.c | 281 ------
.../tests/21/test_tools/tcp_conn/tcp_listen.c | 330 -------
regression-tests/tests/22/desc | 3 -
regression-tests/tests/22/lnst-ctl.conf | 2 -
regression-tests/tests/22/pool/slave1.xml | 6 -
regression-tests/tests/22/pool/slave2.xml | 6 -
regression-tests/tests/22/recipe.xml | 26 -
regression-tests/tests/22/run.sh | 18 -
regression-tests/tests/23/desc | 3 -
regression-tests/tests/23/lnst-ctl.conf | 2 -
regression-tests/tests/23/recipe.xml | 42 -
regression-tests/tests/23/run.sh | 19 -
regression-tests/tests/23/test_modules/IcmpPing.py | 71 --
regression-tests/tests/24/desc | 6 -
regression-tests/tests/24/recipe_fail.xml | 33 -
regression-tests/tests/24/recipe_pass.xml | 33 -
regression-tests/tests/24/run.sh | 22 -
regression-tests/tests/25/desc | 12 -
regression-tests/tests/25/recipe1.xml | 44 -
regression-tests/tests/25/recipe2.xml | 53 -
regression-tests/tests/25/recipe3.xml | 28 -
regression-tests/tests/25/run.sh | 27 -
regression-tests/tests/26/desc | 7 -
regression-tests/tests/26/recipe1.xml | 46 -
regression-tests/tests/26/recipe2.xml | 46 -
regression-tests/tests/26/run.sh | 24 -
regression-tests/tests/27/desc | 10 -
regression-tests/tests/27/recipe1.xml | 32 -
regression-tests/tests/27/recipe2.xml | 32 -
regression-tests/tests/27/recipe3.xml | 31 -
regression-tests/tests/27/recipe4.xml | 31 -
regression-tests/tests/27/recipe5.xml | 32 -
regression-tests/tests/27/recipe6.xml | 30 -
regression-tests/tests/27/recipe7.xml | 30 -
regression-tests/tests/27/recipe8.xml | 32 -
regression-tests/tests/27/run.sh | 48 -
regression-tests/tests/3/desc | 8 -
regression-tests/tests/3/recipe.xml | 21 -
regression-tests/tests/3/run.sh | 12 -
regression-tests/tests/4/desc | 3 -
regression-tests/tests/4/recipe.xml | 43 -
regression-tests/tests/4/run.sh | 19 -
regression-tests/tests/5/desc | 3 -
regression-tests/tests/5/recipe.xml | 29 -
regression-tests/tests/5/run.sh | 20 -
regression-tests/tests/6/desc | 4 -
regression-tests/tests/6/recipe.xml | 35 -
regression-tests/tests/6/run.sh | 19 -
regression-tests/tests/7/desc | 4 -
regression-tests/tests/7/recipe.xml | 24 -
regression-tests/tests/7/run.sh | 19 -
regression-tests/tests/7/task.py | 23 -
regression-tests/tests/8/desc | 3 -
regression-tests/tests/8/recipe.xml | 26 -
regression-tests/tests/8/run.sh | 12 -
regression-tests/tests/9/desc | 3 -
regression-tests/tests/9/recipe.xml | 24 -
regression-tests/tests/9/run.sh | 12 -
regression-tests/tests/9/task.py | 9 -
regression-tests/tests/lib.sh | 67 --
result_xslt/xml_to_html.css | 65 --
result_xslt/xml_to_html.js | 50 -
result_xslt/xml_to_html.xsl | 375 --------
schema-recipe.rng | 638 -------------
schema-sm.rng | 82 --
setup.py | 186 ----
test_modules/DummyFailing.py | 19 -
test_modules/Icmp6Ping.py | 74 --
test_modules/IcmpPing.py | 71 --
test_modules/Iperf.py | 154 ---
test_modules/Multicast.py | 134 ---
test_modules/NetCat.py | 69 --
test_modules/Netperf.py | 203 ----
test_modules/PacketAssert.py | 143 ---
test_modules/PktCounter.py | 72 --
test_modules/PktgenTx.py | 93 --
test_modules/TCPConnection.py | 60 --
test_tools/multicast/Makefile | 21 -
test_tools/multicast/README | 120 ---
test_tools/multicast/client/send_igmp_query.c | 168 ----
test_tools/multicast/client/send_simple.c | 59 --
test_tools/multicast/igmp_utils.h | 167 ----
test_tools/multicast/lnst-setup.sh | 3 -
test_tools/multicast/multicast_utils.h | 192 ----
test_tools/multicast/offline/max_groups.c | 58 --
.../multicast/offline/sockopt_block_source.c | 81 --
test_tools/multicast/offline/sockopt_if.c | 72 --
test_tools/multicast/offline/sockopt_loop.c | 52 -
test_tools/multicast/offline/sockopt_membership.c | 78 --
.../multicast/offline/sockopt_source_membership.c | 85 --
test_tools/multicast/offline/sockopt_ttl.c | 79 --
test_tools/multicast/parameters_igmp.h | 154 ---
test_tools/multicast/parameters_multicast.h | 192 ----
test_tools/multicast/server/recv_block_source.c | 77 --
test_tools/multicast/server/recv_membership.c | 62 --
test_tools/multicast/server/recv_simple.c | 50 -
.../multicast/server/recv_source_membership.c | 63 --
test_tools/multicast/sockopt_utils.h | 187 ----
test_tools/tcp_conn/Makefile | 12 -
test_tools/tcp_conn/lnst-setup.sh | 3 -
test_tools/tcp_conn/tcp_connect.c | 281 ------
test_tools/tcp_conn/tcp_listen.c | 330 -------
407 files changed, 0 insertions(+), 31433 deletions(-)
8 years, 6 months
[lnst: 10/10] recipes: add mtu configuration to phase1 and phase2 tests
by jtluka
commit 81dd19892c26979f3b1eded83510fc8ab7225ab5
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri May 22 13:45:59 2015 +0200
recipes: add mtu configuration to phase1 and phase2 tests
Recipes in phase1 and phase2 directories can now be run with user
specified MTU, for example:
lnst-ctl -A mtu=8000 recipes/regression_tests/phase1/3_vlans.xml
If it is not set the default MTU of 1500 bytes is used.
Version 2: removed the patch file
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
recipes/regression_tests/phase1/3_vlans.py | 12 ++++++++++++
recipes/regression_tests/phase1/3_vlans.xml | 1 +
.../phase1/3_vlans_over_active_backup_bond.xml | 1 +
.../regression_tests/phase1/3_vlans_over_bond.py | 12 ++++++++++++
.../phase1/3_vlans_over_round_robin_bond.xml | 1 +
.../regression_tests/phase1/active_backup_bond.xml | 1 +
.../phase1/active_backup_double_bond.xml | 1 +
recipes/regression_tests/phase1/bonding_test.py | 6 ++++++
recipes/regression_tests/phase1/ping_flood.xml | 1 +
.../regression_tests/phase1/round_robin_bond.xml | 1 +
.../phase1/round_robin_double_bond.xml | 1 +
recipes/regression_tests/phase1/simple_ping.py | 7 +++++++
.../phase2/3_vlans_over_active_backup_team.xml | 1 +
.../phase2/3_vlans_over_round_robin_team.xml | 1 +
.../regression_tests/phase2/3_vlans_over_team.py | 13 +++++++++++++
.../phase2/active_backup_double_team.xml | 1 +
.../regression_tests/phase2/active_backup_team.xml | 1 +
.../active_backup_team_vs_active_backup_bond.xml | 1 +
.../active_backup_team_vs_round_robin_bond.xml | 1 +
.../phase2/round_robin_double_team.xml | 1 +
.../regression_tests/phase2/round_robin_team.xml | 1 +
.../round_robin_team_vs_active_backup_bond.xml | 1 +
.../round_robin_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/team_test.py | 7 +++++++
24 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index a034870..7e79a9f 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -18,6 +18,18 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_phy1 = m1.get_interface("eth1")
+m1_phy1.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
ctl.wait(15)
diff --git a/recipes/regression_tests/phase1/3_vlans.xml b/recipes/regression_tests/phase1/3_vlans.xml
index 2262b6d..ba0455c 100644
--- a/recipes/regression_tests/phase1/3_vlans.xml
+++ b/recipes/regression_tests/phase1/3_vlans.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
index a4ce2a6..60b2efd 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index 2db63cd..dde2359 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -18,6 +18,18 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_bond = m1.get_interface("test_bond")
+m1_bond.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
ctl.wait(15)
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
index d8b2f6a..1aa0149 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_bond.xml b/recipes/regression_tests/phase1/active_backup_bond.xml
index 9121af7..596dec5 100644
--- a/recipes/regression_tests/phase1/active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/active_backup_double_bond.xml b/recipes/regression_tests/phase1/active_backup_double_bond.xml
index a3d89d9..dec15df 100644
--- a/recipes/regression_tests/phase1/active_backup_double_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_double_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py
index d0a18f4..d2d6378 100644
--- a/recipes/regression_tests/phase1/bonding_test.py
+++ b/recipes/regression_tests/phase1/bonding_test.py
@@ -18,6 +18,12 @@ m2.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
offloads = ["tso", "gro", "gso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = m1.get_interface("test_if")
+test_if1.set_mtu(mtu)
+test_if2 = m2.get_interface("test_if")
+test_if2.set_mtu(mtu)
ping_mod = ctl.get_module("IcmpPing",
options={
diff --git a/recipes/regression_tests/phase1/ping_flood.xml b/recipes/regression_tests/phase1/ping_flood.xml
index 3423a22..9409227 100644
--- a/recipes/regression_tests/phase1/ping_flood.xml
+++ b/recipes/regression_tests/phase1/ping_flood.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="machine1">
diff --git a/recipes/regression_tests/phase1/round_robin_bond.xml b/recipes/regression_tests/phase1/round_robin_bond.xml
index a33f2ca..516bf5b 100644
--- a/recipes/regression_tests/phase1/round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/round_robin_double_bond.xml b/recipes/regression_tests/phase1/round_robin_double_bond.xml
index c3313c6..51a871e 100644
--- a/recipes/regression_tests/phase1/round_robin_double_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_double_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase1/simple_ping.py b/recipes/regression_tests/phase1/simple_ping.py
index dc961d7..0882fed 100644
--- a/recipes/regression_tests/phase1/simple_ping.py
+++ b/recipes/regression_tests/phase1/simple_ping.py
@@ -25,6 +25,13 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
ctl.wait(15)
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = hostA.get_interface("testiface")
+test_if1.set_mtu(mtu)
+test_if2 = hostB.get_interface("testiface")
+test_if2.set_mtu(mtu)
+
if ipv in [ 'ipv6', 'both' ]:
hostA.run(ping_mod6)
diff --git a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
index 12910fd..4d27752 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
index aaab95e..d8115b5 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 8be39b4..74b5a5a 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -18,6 +18,19 @@ vlans = ["vlan10", "vlan20", "vlan30"]
offloads = ["gso", "gro", "tso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+m1_team = m1.get_interface("test_if")
+m1_team.set_mtu(mtu)
+m2_phy1 = m2.get_interface("eth1")
+m2_phy1.set_mtu(mtu)
+
+for vlan in vlans:
+ vlan_if1 = m1.get_interface(vlan)
+ vlan_if1.set_mtu(mtu)
+ vlan_if2 = m2.get_interface(vlan)
+ vlan_if2.set_mtu(mtu)
+
ctl.wait(15)
diff --git a/recipes/regression_tests/phase2/active_backup_double_team.xml b/recipes/regression_tests/phase2/active_backup_double_team.xml
index f7b76c4..387937a 100644
--- a/recipes/regression_tests/phase2/active_backup_double_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_double_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team.xml b/recipes/regression_tests/phase2/active_backup_team.xml
index ade4a4c..b798f5b 100644
--- a/recipes/regression_tests/phase2/active_backup_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
index cf2359d..b1cdbfe 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
index 830ee74..6905721 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_double_team.xml b/recipes/regression_tests/phase2/round_robin_double_team.xml
index 0642acc..8fcedca 100644
--- a/recipes/regression_tests/phase2/round_robin_double_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_double_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team.xml b/recipes/regression_tests/phase2/round_robin_team.xml
index a3a1031..d9d277b 100644
--- a/recipes/regression_tests/phase2/round_robin_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_team.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
index fae0d9f..76513da 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
index 3c406da..e91558c 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
@@ -1,6 +1,7 @@
<lnstrecipe>
<define>
<alias name="ipv" value="both" />
+ <alias name="mtu" value="1500" />
</define>
<network>
<host id="testmachine1">
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 776589a..88cbb8c 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -17,6 +17,13 @@ m2.sync_resources(modules=["IcmpPing", "Icmp6Ping", "Netperf"])
offloads = ["tso", "gro", "gso"]
ipv = ctl.get_alias('ipv')
+mtu = ctl.get_alias('mtu')
+
+test_if1 = m1.get_interface("test_if")
+test_if1.set_mtu(mtu)
+test_if2 = m2.get_interface("test_if")
+test_if2.set_mtu(mtu)
+
ping_mod = ctl.get_module("IcmpPing",
options={
8 years, 6 months
[lnst: 9/10] recipes: remove offload configuration for ping tests between different vlans
by jtluka
commit a75f26179af5cb5be73c21c6fa3a97d3f2c3be1f
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri May 22 13:34:13 2015 +0200
recipes: remove offload configuration for ping tests between different vlans
For ICMP/ICMP6 ping tests between different vlans that are deemed to fail,
we don't need to iterate over offload turning on and off. This is also to
speed up the regression tests.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
recipes/regression_tests/phase1/3_vlans.py | 26 ++++++-----------
.../regression_tests/phase1/3_vlans_over_bond.py | 28 ++++++-------------
.../regression_tests/phase2/3_vlans_over_team.py | 29 ++++++-------------
3 files changed, 27 insertions(+), 56 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index 3ead92f..a034870 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -96,10 +96,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1, 1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
@@ -128,19 +128,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # Offload setup
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
- offload, state))
- m2.run("ethtool -K %s %s %s" % (m2.get_devname("eth1"),
- offload, state))
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv4', 'both' ]:
- # Ping test
- m1.run(ping_mod, expect="fail")
-
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index f793ed6..2db63cd 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -96,10 +96,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1, 1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
@@ -130,21 +130,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # Offload setup
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
- offload, state))
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth2"),
- offload, state))
- m2.run("ethtool -K %s %s %s" % (m2.get_devname("eth1"),
- offload, state))
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv4', 'both' ]:
- # Ping test
- m1.run(ping_mod, expect="fail")
-
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 96d1be2..8be39b4 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -95,10 +95,10 @@ for vlan1 in vlans:
"-L %s -6" % m2.get_ip(vlan1, 1)
})
- for offload in offloads:
+ if vlan1 == vlan2:
# These tests should pass
# Ping between same VLANs
- if vlan1 == vlan2:
+ for offload in offloads:
for state in ["off", "on"]:
# Offload setup
m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
@@ -131,22 +131,11 @@ for vlan1 in vlans:
m2.run(netperf_cli_udp6, timeout=70)
srv_proc.intr()
- # These tests should fail
- # Ping across different VLAN
- elif vlan1 != vlan2:
- for state in ["off", "on"]:
- # Offload setup
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth1"),
- offload, state))
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth2"),
- offload, state))
- m1.run("ethtool -K %s %s %s" % (m1.get_devname("eth3"),
- offload, state))
- m2.run("ethtool -K %s %s %s" % (m2.get_devname("eth1"),
- offload, state))
- # Ping test
- if ipv in [ 'ipv4', 'both' ]:
- m1.run(ping_mod, expect="fail")
+ # These tests should fail
+ # Ping across different VLAN
+ else:
+ if ipv in [ 'ipv4', 'both' ]:
+ m1.run(ping_mod, expect="fail")
- if ipv in [ 'ipv6', 'both' ]:
- m1.run(ping_mod6, expect="fail")
+ if ipv in [ 'ipv6', 'both' ]:
+ m1.run(ping_mod6, expect="fail")
8 years, 6 months
[lnst: 8/10] Add example recipes from LNST wiki page about NetEm
by jtluka
commit f4a2a77db9097230236a5c1caf331559ea29ef71
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 18:11:34 2015 +0200
Add example recipes from LNST wiki page about NetEm
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/examples/netem/corruption.xml | 39 +++++++++++++++++++++++++
recipes/examples/netem/delay.xml | 43 ++++++++++++++++++++++++++++
recipes/examples/netem/duplication.xml | 39 +++++++++++++++++++++++++
recipes/examples/netem/loss.xml | 39 +++++++++++++++++++++++++
recipes/examples/netem/netem_test.py | 41 ++++++++++++++++++++++++++
recipes/examples/netem/reordering.xml | 49 ++++++++++++++++++++++++++++++++
6 files changed, 250 insertions(+), 0 deletions(-)
---
diff --git a/recipes/examples/netem/corruption.xml b/recipes/examples/netem/corruption.xml
new file mode 100644
index 0000000..7d2b645
--- /dev/null
+++ b/recipes/examples/netem/corruption.xml
@@ -0,0 +1,39 @@
+<lnstrecipe>
+ <network>
+ <host id="machine1">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <corrupt>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </corrupt>
+ </netem>
+ <addresses>
+ <address>192.168.101.10/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="machine2">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <corrupt>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </corrupt>
+ </netem>
+ <addresses>
+ <address>192.168.101.11/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ </network>
+ <task python="netem_test.py"/>
+</lnstrecipe>
diff --git a/recipes/examples/netem/delay.xml b/recipes/examples/netem/delay.xml
new file mode 100644
index 0000000..aad5cb9
--- /dev/null
+++ b/recipes/examples/netem/delay.xml
@@ -0,0 +1,43 @@
+<lnstrecipe>
+ <network>
+ <host id="machine1">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <delay>
+ <options>
+ <option name="time" value="10ms" />
+ <option name="jitter" value="1ms" />
+ <option name="correlation" value="50%" />
+ <option name="distribution" value="normal" />
+ </options>
+ </delay>
+ </netem>
+ <addresses>
+ <address>192.168.101.10/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="machine2">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <delay>
+ <options>
+ <option name="time" value="10ms" />
+ <option name="jitter" value="1ms" />
+ <option name="correlation" value="50%" />
+ <option name="distribution" value="normal" />
+ </options>
+ </delay>
+ </netem>
+ <addresses>
+ <address>192.168.101.11/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ </network>
+ <task python="netem_test.py"/>
+</lnstrecipe>
diff --git a/recipes/examples/netem/duplication.xml b/recipes/examples/netem/duplication.xml
new file mode 100644
index 0000000..9b43183
--- /dev/null
+++ b/recipes/examples/netem/duplication.xml
@@ -0,0 +1,39 @@
+<lnstrecipe>
+ <network>
+ <host id="machine1">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <duplication>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </duplication>
+ </netem>
+ <addresses>
+ <address>192.168.101.10/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="machine2">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <duplication>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </duplication>
+ </netem>
+ <addresses>
+ <address>192.168.101.11/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ </network>
+ <task python="netem_test.py"/>
+</lnstrecipe>
diff --git a/recipes/examples/netem/loss.xml b/recipes/examples/netem/loss.xml
new file mode 100644
index 0000000..2ec6cb9
--- /dev/null
+++ b/recipes/examples/netem/loss.xml
@@ -0,0 +1,39 @@
+<lnstrecipe>
+ <network>
+ <host id="machine1">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <loss>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </loss>
+ </netem>
+ <addresses>
+ <address>192.168.101.10/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="machine2">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <loss>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </loss>
+ </netem>
+ <addresses>
+ <address>192.168.101.11/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ </network>
+ <task python="netem_test.py"/>
+</lnstrecipe>
diff --git a/recipes/examples/netem/netem_test.py b/recipes/examples/netem/netem_test.py
new file mode 100644
index 0000000..2405f11
--- /dev/null
+++ b/recipes/examples/netem/netem_test.py
@@ -0,0 +1,41 @@
+from lnst.Controller.Task import ctl
+
+hostA = ctl.get_host("machine1")
+hostB = ctl.get_host("machine2")
+
+hostA.sync_resources(modules=["IcmpPing", "Netperf"])
+hostB.sync_resources(modules=["IcmpPing", "Netperf"])
+
+ping_mod = ctl.get_module("IcmpPing",
+ options={
+ "addr": hostB.get_ip("testiface", 0),
+ "count": 1000,
+ "interval": 0.1,
+ "iface" : hostA.get_devname("testiface")})
+
+netserver = ctl.get_module("Netperf",
+ options={
+ "role" : "server",
+ "bind" : hostA.get_ip("testiface")})
+
+netperf_tcp = ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "netperf_server" : hostA.get_ip("testiface"),
+ "duration" : 60,
+ "testname" : "TCP_STREAM",
+ "netperf_opts" : "-L %s" % hostB.get_ip("testiface")})
+
+netperf_udp= ctl.get_module("Netperf",
+ options={
+ "role" : "client",
+ "netperf_server" : hostA.get_ip("testiface"),
+ "duration" : 60,
+ "testname" : "UDP_STREAM"})
+
+hostA.run(ping_mod, timeout=500)
+server_proc = hostA.run(netserver, bg=True)
+ctl.wait(2)
+hostB.run(netperf_tcp, timeout=100)
+hostB.run(netperf_udp, timeout=100)
+server_proc.intr()
diff --git a/recipes/examples/netem/reordering.xml b/recipes/examples/netem/reordering.xml
new file mode 100644
index 0000000..5f96893
--- /dev/null
+++ b/recipes/examples/netem/reordering.xml
@@ -0,0 +1,49 @@
+<lnstrecipe>
+ <network>
+ <host id="machine1">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <delay>
+ <options>
+ <option name="time" value="10ms" />
+ </options>
+ </delay>
+ <reordering>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </reordering>
+ </netem>
+ <addresses>
+ <address>192.168.101.10/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ <host id="machine2">
+ <interfaces>
+ <eth id="testiface" label="testnet">
+ <netem>
+ <delay>
+ <options>
+ <option name="time" value="10ms" />
+ </options>
+ </delay>
+ <reordering>
+ <options>
+ <option name="percent" value="10%" />
+ <option name="correlation" value="50%" />
+ </options>
+ </reordering>
+ </netem>
+ <addresses>
+ <address>192.168.101.11/24</address>
+ </addresses>
+ </eth>
+ </interfaces>
+ </host>
+ </network>
+ <task python="netem_test.py"/>
+</lnstrecipe>
8 years, 6 months
[lnst: 7/10] Add netem variant to smoke tests
by jtluka
commit 21893e81e7b6e4ef8c9ffdf9c219325426c819a6
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 16:16:20 2015 +0200
Add netem variant to smoke tests
In this variant all five (delay, loss, corrupt, duplication, reordering)
netem params are used
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/smoke/lib/conf-netem.xml | 42 ++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
---
diff --git a/recipes/smoke/lib/conf-netem.xml b/recipes/smoke/lib/conf-netem.xml
new file mode 100644
index 0000000..6163ab4
--- /dev/null
+++ b/recipes/smoke/lib/conf-netem.xml
@@ -0,0 +1,42 @@
+<interfaces>
+ <eth id="testiface" label="net">
+ <netem>
+ <delay>
+ <options>
+ <option name="time" value="10ms" />
+ <option name="jitter" value="1ms" />
+ <option name="correlation" value="50%" />
+ <option name="distribution" value="normal" />
+ </options>
+ </delay>
+ <loss>
+ <options>
+ <option name="percent" value="1%" />
+ <option name="correlation" value="15%" />
+ </options>
+ </loss>
+ <corrupt>
+ <options>
+ <option name="percent" value="1%" />
+ <option name="correlation" value="25%" />
+ </options>
+ </corrupt>
+ <duplication>
+ <options>
+ <option name="percent" value="1%" />
+ <option name="correlation" value="25%" />
+ </options>
+ </duplication>
+ <reordering>
+ <options>
+ <option name="percent" value="1%" />
+ <option name="correlation" value="25%" />
+ <option name="gap_distance" value="5" />
+ </options>
+ </reordering>
+ </netem>
+ <addresses>
+ <address value="{$testip}"/>
+ </addresses>
+ </eth>
+</interfaces>
8 years, 6 months
[lnst: 6/10] Add netem to smoke tests variables config
by jtluka
commit 7f6794c15e73fdf4d26a6489abf1a68a97dd459c
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 16:16:19 2015 +0200
Add netem to smoke tests variables config
netem-vlan and vlan-netem ICMP test will fail, this needs to be specified in
variables config
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/smoke/lib/variables.conf | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/recipes/smoke/lib/variables.conf b/recipes/smoke/lib/variables.conf
index 0c9b066..b4dd344 100644
--- a/recipes/smoke/lib/variables.conf
+++ b/recipes/smoke/lib/variables.conf
@@ -12,3 +12,7 @@ icmp_result=fail
icmp_result=fail
[vlan-eth]
icmp_result=fail
+[vlan-netem]
+icmp_result=fail
+[netem-vlan]
+icmp_result=fail
8 years, 6 months
[lnst: 5/10] Add Slave NetEm param configuration and deconfiguration support
by jtluka
commit acae4999ba1fe83ff5a7de570832512a2c6f76eb
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 14:24:20 2015 +0200
Add Slave NetEm param configuration and deconfiguration support
This patch provides support for compiling and tc command with NetEm
params for both configuration and deconfiguration. Supported are
both NetworkManager and non-NetworkManager variants.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NetConfigDevice.py | 11 ++++++++++-
lnst/Slave/NmConfigDevice.py | 9 ++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 4ac2899..6569410 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -15,7 +15,7 @@ import logging
import re
import sys
from lnst.Common.ExecCmd import exec_cmd
-from lnst.Slave.NetConfigCommon import get_slaves, get_option, get_slave_option
+from lnst.Slave.NetConfigCommon import get_slaves, get_option, get_slave_option, parse_netem
from lnst.Common.Utils import kmod_in_use, bool_it
from lnst.Slave.NmConfigDevice import type_class_mapping as nm_type_class_mapping
from lnst.Slave.NmConfigDevice import is_nm_managed
@@ -86,6 +86,15 @@ class NetConfigDeviceEth(NetConfigDeviceGeneric):
config = self._dev_config
exec_cmd("ip addr flush %s" % config["name"])
exec_cmd("ethtool -A %s rx off tx off" % config["name"], die_on_err=False, log_outputs=False)
+ if config["netem"] is not None:
+ cmd = "tc qdisc add dev %s root netem %s" % (config["name"], parse_netem(config["netem"]))
+ exec_cmd(cmd)
+ config["netem_cmd"] = cmd
+
+ def deconfigure(self):
+ config = self._dev_config
+ if "netem_cmd" in config:
+ exec_cmd(config["netem_cmd"].replace("add", "del"))
class NetConfigDeviceLoopback(NetConfigDeviceGeneric):
def configure(self):
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index c3824cb..8e2f1dd 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -19,7 +19,7 @@ import uuid
import socket, struct
import time
from lnst.Common.ExecCmd import exec_cmd
-from lnst.Slave.NetConfigCommon import get_slaves, get_option, get_slave_option
+from lnst.Slave.NetConfigCommon import get_slaves, get_option, get_slave_option, parse_netem
from lnst.Common.Utils import kmod_in_use, bool_it
from lnst.Common.NetUtils import scan_netdevs
from lnst.Common.Utils import check_process_running
@@ -371,8 +371,15 @@ class NmConfigDeviceEth(NmConfigDeviceGeneric):
self._connection = connection
self._nm_add_connection()
+ if config["netem"] is not None:
+ cmd = "tc qdisc add dev %s root netem %s" % (config["name"], parse_netem(config["netem"]))
+ exec_cmd(cmd)
+ config["netem_cmd"] = cmd
def deconfigure(self):
+ config = self._dev_config
+ if "netem_cmd" in config:
+ exec_cmd(config["netem_cmd"].replace("add", "del"))
if self._con_obj_path != None:
self._nm_rm_connection()
8 years, 6 months
[lnst: 4/10] Add Slave methods for NetEm value parsing from interface config
by jtluka
commit 742d4050d3f283018975c6d0437c7b4275d277fe
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 14:24:19 2015 +0200
Add Slave methods for NetEm value parsing from interface config
This patch provides Slave methods for parsing values from NetEm
tag in config dict.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NetConfigCommon.py | 77 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
---
diff --git a/lnst/Slave/NetConfigCommon.py b/lnst/Slave/NetConfigCommon.py
index c60419b..ffcb0b4 100644
--- a/lnst/Slave/NetConfigCommon.py
+++ b/lnst/Slave/NetConfigCommon.py
@@ -35,3 +35,80 @@ def get_slave_option(netdev, slave_id, opt_name):
if option == opt_name:
return value
return None
+
+def get_netem_option(netem_tag, netem_name, opt_name):
+ try:
+ options = netem_tag[netem_name]
+ except KeyError:
+ return None
+ for opt in options:
+ if opt["name"] == opt_name:
+ return opt["value"]
+
+def parse_delay(config):
+ time = get_netem_option(config, "delay", "time")
+ jitter= get_netem_option(config, "delay", "jitter")
+ correlation = get_netem_option(config, "delay", "correlation")
+ distribution = get_netem_option(config, "delay", "distribution")
+ rv = "delay %s " % time
+ if jitter is not None:
+ rv = rv + "%s " % jitter
+ if correlation is not None:
+ rv = rv + "%s " % correlation
+ if distribution is not None:
+ rv = rv + "distribution %s " % distribution
+ return rv
+
+def parse_loss(config):
+ percent = get_netem_option(config, "loss", "percent")
+ correlation = get_netem_option(config, "loss", "correlation")
+ rv = "loss %s " % percent
+ if correlation is not None:
+ rv = rv + "%s " % correlation
+ return rv
+
+def parse_corrupt(config):
+ percent = get_netem_option(config, "corrupt", "percent")
+ correlation = get_netem_option(config, "corrupt", "correlation")
+ rv = "corrupt %s " % percent
+ if correlation is not None:
+ rv = rv + "%s " % correlation
+ return rv
+
+def parse_duplication(config):
+ percent = get_netem_option(config, "duplication", "percent")
+ correlation = get_netem_option(config, "duplication", "correlation")
+ rv = "duplicate %s " % percent
+ if correlation is not None:
+ rv = rv + "%s " % correlation
+ return rv
+
+def parse_reordering(config):
+ percent = get_netem_option(config, "reordering", "percent")
+ correlation = get_netem_option(config, "reordering", "correlation")
+ gap_distance = get_netem_option(config, "reordering", "gap_distance")
+ rv = "reorder %s " % percent
+ if correlation is not None:
+ rv = rv + "%s " % correlation
+ if gap_distance is not None:
+ rv = rv + "gap %s " % gap_distance
+ return rv
+
+def parse_netem(config):
+ rv = ""
+ # delay parsing
+ if "delay" in config:
+ rv = rv + parse_delay(config)
+ # loss parsing
+ if "loss" in config:
+ rv = rv + parse_loss(config)
+ # corrupt
+ if "corrupt" in config:
+ rv = rv + parse_corrupt(config)
+ # duplication
+ if "duplication" in config:
+ rv = rv + parse_duplication(config)
+ # reordering
+ if "reordering" in config:
+ rv = rv + parse_reordering(config)
+ return rv
8 years, 6 months
[lnst: 3/10] Add Controller support for NetEm.
by jtluka
commit 8887f077ba9597cc76a93c657cf96a8cfb088ec3
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Thu May 21 14:24:18 2015 +0200
Add Controller support for NetEm.
This patch adds support for processing from XML recipe and sending to Slave
with other interface configuration. NetEm params for interface are stored
in dict with config, under key "netem" and the values from config are parsed
on Slave. (see next commit)
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/Machine.py | 6 +++++-
lnst/Controller/NetTestController.py | 3 +++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index dc30ef0..52e85e4 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -500,6 +500,7 @@ class Interface(object):
self._hwaddr = None
self._devname = None
self._network = None
+ self._netem = None
self._slaves = {}
self._slave_options = {}
@@ -550,6 +551,9 @@ class Interface(object):
def set_option(self, name, value):
self._options.append((name, value))
+ def set_netem(self, netem):
+ self._netem = netem
+
def add_master(self, master, primary=True):
if primary and self._master["primary"] != None:
msg = "Interface %s already has a primary master."\
@@ -642,7 +646,7 @@ class Interface(object):
"slave_options": self._slave_options,
"master": None, "other_masters": [],
"ovs_conf": self._ovs_conf, "netns": self._netns,
- "peer": self._peer}
+ "peer": self._peer, "netem" : self._netem}
if self._master["primary"] != None:
config["master"] = self._master["primary"].get_id()
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index efeeb92..eeb6426 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -326,6 +326,9 @@ class NetTestController:
for opt in iface_xml_data["options"]:
iface.set_option(opt["name"], opt["value"])
+ if "netem" in iface_xml_data:
+ iface.set_netem(iface_xml_data["netem"].to_dict())
+
if "ovs_conf" in iface_xml_data:
iface.set_ovs_conf(iface_xml_data["ovs_conf"].to_dict())
8 years, 6 months