[PATCH] RFC on the following patch
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Before applying the following patch, please review and provide feedback if it
makes sense...
Ondrej Lichtner (1):
NetTestCommand: fix signal handling for bg commands
lnst/Common/NetTestCommand.py | 13 +---
lnst/Common/TestsCommon.py | 14 ++--
regression-tests/tests/25/lnst-ctl.conf | 2 -
regression-tests/tests/25/recipe2.xml | 20 +++---
regression-tests/tests/25/recipe3.xml | 53 ---------------
regression-tests/tests/25/run.sh | 9 +--
regression-tests/tests/25/test_modules/IcmpPing.py | 75 ----------------------
7 files changed, 21 insertions(+), 165 deletions(-)
delete mode 100644 regression-tests/tests/25/lnst-ctl.conf
delete mode 100644 regression-tests/tests/25/recipe3.xml
delete mode 100644 regression-tests/tests/25/test_modules/IcmpPing.py
--
2.1.0
8 years, 7 months
[lnst] NetConfigDevice: fix macvlan hwaddr option configuration
by Jiří Pírko
commit d7c1b6177cf764a12bf6abf8d8eefbfec341658f
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri Feb 27 17:26:28 2015 +0100
NetConfigDevice: fix macvlan hwaddr option configuration
When a user wants to configure hwaddr on macvlan device the slave will
encounter an exception on malformed ip command.
This is because the slave expected different data structure (dict entry)
than actually provided (list of options).
Fixes #104.
Tested on following setup:
<eth id="phy1" label="testnet"/>
<macvlan>
<options>
<option name="hwaddr" value="0A:00:00:00:00:01"/>
</options>
<slaves>
<slave id="phy1"/>
</slaves>
<addresses>
<address>192.168.100.1/24</address>
</addresses>
</macvlan>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NetConfigDevice.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 77074a6..4ac2899 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -192,10 +192,10 @@ class NetConfigDeviceMacvlan(NetConfigDeviceGeneric):
realdev_name = self._if_manager.get_mapped_device(realdev_id).get_name()
dev_name = config["name"]
- if "hwaddr" in config:
- hwaddr = " address %s" % config["hwaddr"]
- else:
- hwaddr = ""
+ hwaddr = ""
+ for opt, value in config["options"]:
+ if opt == "hwaddr":
+ hwaddr = " address %s" % value
exec_cmd("ip link add link %s %s%s type macvlan"
% (realdev_name, dev_name, hwaddr))
8 years, 7 months
[PATCH] NetConfigDevice: fix macvlan hwaddr option configuration
by Jan Tluka
When a user wants to configure hwaddr on macvlan device the slave will
encounter an exception on malformed ip command.
This is because the slave expected different data structure (dict entry)
than actually provided (list of options).
Fixes #104.
Tested on following setup:
<eth id="phy1" label="testnet"/>
<macvlan>
<options>
<option name="hwaddr" value="0A:00:00:00:00:01"/>
</options>
<slaves>
<slave id="phy1"/>
</slaves>
<addresses>
<address>192.168.100.1/24</address>
</addresses>
</macvlan>
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Slave/NetConfigDevice.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 77074a6..4ac2899 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -192,10 +192,10 @@ class NetConfigDeviceMacvlan(NetConfigDeviceGeneric):
realdev_name = self._if_manager.get_mapped_device(realdev_id).get_name()
dev_name = config["name"]
- if "hwaddr" in config:
- hwaddr = " address %s" % config["hwaddr"]
- else:
- hwaddr = ""
+ hwaddr = ""
+ for opt, value in config["options"]:
+ if opt == "hwaddr":
+ hwaddr = " address %s" % value
exec_cmd("ip link add link %s %s%s type macvlan"
% (realdev_name, dev_name, hwaddr))
--
1.9.3
8 years, 7 months
[lnst] recipes: Change Python tasks Icmp6Ping module calls to use IP as source, not device.
by Jiří Pírko
commit 1303fd1161f29085dc26aeb6a656e4b65b52c4b3
Author: Jiri Prochazka <jprochaz(a)redhat.com>
Date: Fri Feb 27 15:03:19 2015 +0100
recipes: Change Python tasks Icmp6Ping module calls to use IP as source, not device.
ping6 is currently bugged, when device is entered as -I argument,
it sometimes uses IP from different device. This patch forces ping6
to use IP on selected device.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
recipes/regression_tests/phase1/3_vlans.py | 2 +-
.../regression_tests/phase1/3_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/simple_ping.py | 2 +-
.../phase1/virtual_bridge_2_vlans_over_bond.py | 2 +-
.../phase1/virtual_bridge_vlan_in_guest.py | 4 ++--
.../phase1/virtual_bridge_vlan_in_host.py | 2 +-
.../regression_tests/phase2/3_vlans_over_team.py | 2 +-
recipes/regression_tests/phase2/team_test.py | 4 ++--
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 2 +-
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 2 +-
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 2 +-
11 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index c7f8824..f59e941 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index a9a0eb8..0ea489b 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/simple_ping.py b/recipes/regression_tests/phase1/simple_ping.py
index b19b2d7..74fd026 100644
--- a/recipes/regression_tests/phase1/simple_ping.py
+++ b/recipes/regression_tests/phase1/simple_ping.py
@@ -19,7 +19,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
"addr": hostB.get_ip("testiface", 1),
"count": 100,
"interval": 0.2,
- "iface" : hostA.get_devname("testiface"),
+ "iface" : hostA.get_ip("testiface"),
"limit_rate": 90})
if ctl.get_alias('ipv') == 'ipv6':
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index 6f024ed..27c21f1 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -37,7 +37,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
index 41dd0b5..8334d6e 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
@@ -127,4 +127,4 @@ for offload in offloads:
ctl.wait(2)
h2.run(netperf_cli_tcp6, timeout=65)
h2.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 2ede5d4..3deb7f4 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 78e9efe..ae6e164 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -30,7 +30,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : m2.get_ip("test_if", 1),
"count" : 100,
- "iface" : m1.get_devname("test_if"),
+ "iface" : m1.get_ip("test_if"),
"interval" : 0.1
})
@@ -222,4 +222,4 @@ for offload in offloads:
ctl.wait(2)
m1.run(netperf_cli_tcp6, timeout=65)
m1.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index a4cfdd8..0de17d5 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -38,7 +38,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
index 0d6aba8..63b5ed4 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
8 years, 7 months
[PATCH] Change Python tasks Icmp6Ping module calls to use IP as source, not device.
by Jiri Prochazka
From: Jiri Prochazka <jprochaz(a)redhat.com>
ping6 is currently bugged, when device is entered as -I argument, it sometimes uses IP from different device. This patch forces ping6 to use IP on selected device.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.py | 2 +-
recipes/regression_tests/phase1/3_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/simple_ping.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py | 4 ++--
recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py | 2 +-
recipes/regression_tests/phase2/3_vlans_over_team.py | 2 +-
recipes/regression_tests/phase2/team_test.py | 4 ++--
.../phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py | 2 +-
11 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index c7f8824..f59e941 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index a9a0eb8..0ea489b 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/simple_ping.py b/recipes/regression_tests/phase1/simple_ping.py
index b19b2d7..74fd026 100644
--- a/recipes/regression_tests/phase1/simple_ping.py
+++ b/recipes/regression_tests/phase1/simple_ping.py
@@ -19,7 +19,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
"addr": hostB.get_ip("testiface", 1),
"count": 100,
"interval": 0.2,
- "iface" : hostA.get_devname("testiface"),
+ "iface" : hostA.get_ip("testiface"),
"limit_rate": 90})
if ctl.get_alias('ipv') == 'ipv6':
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index 6f024ed..27c21f1 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -37,7 +37,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
index 41dd0b5..8334d6e 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
@@ -127,4 +127,4 @@ for offload in offloads:
ctl.wait(2)
h2.run(netperf_cli_tcp6, timeout=65)
h2.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 2ede5d4..3deb7f4 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 78e9efe..ae6e164 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -30,7 +30,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : m2.get_ip("test_if", 1),
"count" : 100,
- "iface" : m1.get_devname("test_if"),
+ "iface" : m1.get_ip("test_if"),
"interval" : 0.1
})
@@ -222,4 +222,4 @@ for offload in offloads:
ctl.wait(2)
m1.run(netperf_cli_tcp6, timeout=65)
m1.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index a4cfdd8..0de17d5 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -38,7 +38,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
index 0d6aba8..63b5ed4 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
--
2.1.0
8 years, 7 months
[PATCH] Change Python task's Icmp6Ping module calls to use IP as source for ping6, not device.
by Jiri Prochazka
From: Jiri Prochazka <jprochaz(a)redhat.com>
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.py | 2 +-
recipes/regression_tests/phase1/3_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/simple_ping.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py | 4 ++--
recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py | 2 +-
recipes/regression_tests/phase2/3_vlans_over_team.py | 2 +-
recipes/regression_tests/phase2/team_test.py | 4 ++--
.../phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py | 2 +-
11 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index c7f8824..f59e941 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index a9a0eb8..0ea489b 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/simple_ping.py b/recipes/regression_tests/phase1/simple_ping.py
index b19b2d7..74fd026 100644
--- a/recipes/regression_tests/phase1/simple_ping.py
+++ b/recipes/regression_tests/phase1/simple_ping.py
@@ -19,7 +19,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
"addr": hostB.get_ip("testiface", 1),
"count": 100,
"interval": 0.2,
- "iface" : hostA.get_devname("testiface"),
+ "iface" : hostA.get_ip("testiface"),
"limit_rate": 90})
if ctl.get_alias('ipv') == 'ipv6':
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index 6f024ed..27c21f1 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -37,7 +37,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
index 41dd0b5..8334d6e 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
@@ -127,4 +127,4 @@ for offload in offloads:
ctl.wait(2)
h2.run(netperf_cli_tcp6, timeout=65)
h2.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 2ede5d4..3deb7f4 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -33,7 +33,7 @@ for vlan1 in vlans:
options={
"addr" : m2.get_ip(vlan2, 1),
"count" : 100,
- "iface" : m1.get_devname(vlan1),
+ "iface" : m1.get_ip(vlan1),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 78e9efe..ae6e164 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -30,7 +30,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : m2.get_ip("test_if", 1),
"count" : 100,
- "iface" : m1.get_devname("test_if"),
+ "iface" : m1.get_ip("test_if"),
"interval" : 0.1
})
@@ -222,4 +222,4 @@ for offload in offloads:
ctl.wait(2)
m1.run(netperf_cli_tcp6, timeout=65)
m1.run(netperf_cli_udp6, timeout=65)
- server_proc.intr()
\ No newline at end of file
+ server_proc.intr()
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index a4cfdd8..0de17d5 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -38,7 +38,7 @@ ping_mod2 = ctl.get_module("IcmpPing",
options={
"addr" : g2.get_ip("guestnic", 0),
"count" : 100,
- "iface" : g4.get_devname("guestnic"),
+ "iface" : g4.get_ip("guestnic"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
index 0d6aba8..63b5ed4 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("vlan10"),
+ "iface" : g1.get_ip("vlan10"),
"interval" : 0.1
})
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
index 3344d81..e4d3810 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
@@ -32,7 +32,7 @@ ping_mod6 = ctl.get_module("Icmp6Ping",
options={
"addr" : h2.get_ip("vlan10", 1),
"count" : 100,
- "iface" : g1.get_devname("guestnic"),
+ "iface" : g1.get_ip("guestnic"),
"interval" : 0.1
})
--
2.1.0
8 years, 7 months
[lnst] readme: copyright date updated
by Jiří Pírko
commit 89f65c4fba672f2b2df0a03299b8309395ce496f
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Fri Feb 27 09:31:22 2015 +0100
readme: copyright date updated
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
README.md | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/README.md b/README.md
index a929e2f..f87a89e 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ su
## License
-**Copyright (C) 2011-2013 Red Hat, Inc.**
+**Copyright (C) 2011-2015 Red Hat, Inc.**
LNST is distributed under GNU General Public License version 2. See the file
"COPYING" in the source distribution for information on terms & conditions
8 years, 7 months
[lnst] test_tools: fix IP_MULTICAST_IF sockopt bug
by Jiří Pírko
commit 27f55fbdb4bcb4a25b38ef98ba5fec81c5bc2e09
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Thu Feb 26 16:55:26 2015 +0100
test_tools: fix IP_MULTICAST_IF sockopt bug
Test for setting socket option IP_MULTICAST_IF using struct ip_mreqn is buggy.
System call setsockopt() can use both in_addr and ip_mreqn structs but getsockopt()
returns struct in_addr only. Therefore the test failed because the size
of the passed and returned structure did not match.
I added second function test_sockopt_value_ext() that takes additional two
parameters that are expected when getsockopt() is called.
The former test_sockopt_value() was changed to a wrapper of the new
function test_sockopt_value_ext().
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
test_tools/multicast/offline/sockopt_if.c | 10 ++++++----
test_tools/multicast/sockopt_utils.h | 16 ++++++++++++++--
2 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/test_tools/multicast/offline/sockopt_if.c b/test_tools/multicast/offline/sockopt_if.c
index 2396629..a6c9534 100644
--- a/test_tools/multicast/offline/sockopt_if.c
+++ b/test_tools/multicast/offline/sockopt_if.c
@@ -39,14 +39,16 @@ void test_if()
struct ip_mreqn mreqn;
mreqn.imr_multiaddr.s_addr = inet_addr("239.1.2.3");
mreqn.imr_address.s_addr = INADDR_ANY;
+ address.s_addr = INADDR_ANY;
mreqn.imr_ifindex = 0;
- test_sockopt_value("IP_MULTICAST_IF set to INADDR_ANY",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ test_sockopt_value_ext("IP_MULTICAST_IF set to INADDR_ANY mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
mreqn.imr_address.s_addr = inet_addr("127.0.0.1");
- test_sockopt_value("IP_MULTICAST_IF set to 127.0.0.1",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ address.s_addr = inet_addr("127.0.0.1");
+ test_sockopt_value_ext("IP_MULTICAST_IF set to 127.0.0.1 mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
/* Errors */
diff --git a/test_tools/multicast/sockopt_utils.h b/test_tools/multicast/sockopt_utils.h
index 6486f71..330b765 100644
--- a/test_tools/multicast/sockopt_utils.h
+++ b/test_tools/multicast/sockopt_utils.h
@@ -122,11 +122,23 @@ void test_setsockopt(char* test_name, int optname, void *optval,
printf("%s=pass\n", test_name);
}
+/* In some cases setsockopt and getsockopt can work with different data
+ * structures, e.g. setsockopt() can use 'struct ip_mreqn' for setting
+ * the source ip address and getsockopt() always returns 'struct in_addr'.
+ * This function is provided to deal with such situation.
+ */
+void test_sockopt_value_ext(char* test_name, int optname,
+ void *optval, socklen_t optlen,
+ void *expval, socklen_t explen)
+{
+ test_setsockopt(test_name, optname, optval, optlen);
+ test_getsockopt(test_name, optname, expval, explen);
+}
+
void test_sockopt_value(char* test_name, int optname,
void *optval, socklen_t optlen)
{
- test_setsockopt(test_name, optname, optval, optlen);
- test_getsockopt(test_name, optname, optval, optlen);
+ test_sockopt_value_ext(test_name, optname, optval, optlen, optval, optlen);
}
void test_setsockopt_error(char* test_name, int optname, void *optval,
8 years, 7 months
[PATCH v2] test_tools: fix IP_MULTICAST_IF sockopt bug
by Jan Tluka
Test for setting socket option IP_MULTICAST_IF using struct ip_mreqn is buggy.
System call setsockopt() can use both in_addr and ip_mreqn structs but getsockopt()
returns struct in_addr only. Therefore the test failed because the size
of the passed and returned structure did not match.
I added second function test_sockopt_value_ext() that takes additional two
parameters that are expected when getsockopt() is called.
The former test_sockopt_value() was changed to a wrapper of the new
function test_sockopt_value_ext().
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
test_tools/multicast/offline/sockopt_if.c | 10 ++++++----
test_tools/multicast/sockopt_utils.h | 16 ++++++++++++++--
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/test_tools/multicast/offline/sockopt_if.c b/test_tools/multicast/offline/sockopt_if.c
index 2396629..a6c9534 100644
--- a/test_tools/multicast/offline/sockopt_if.c
+++ b/test_tools/multicast/offline/sockopt_if.c
@@ -39,14 +39,16 @@ void test_if()
struct ip_mreqn mreqn;
mreqn.imr_multiaddr.s_addr = inet_addr("239.1.2.3");
mreqn.imr_address.s_addr = INADDR_ANY;
+ address.s_addr = INADDR_ANY;
mreqn.imr_ifindex = 0;
- test_sockopt_value("IP_MULTICAST_IF set to INADDR_ANY",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ test_sockopt_value_ext("IP_MULTICAST_IF set to INADDR_ANY mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
mreqn.imr_address.s_addr = inet_addr("127.0.0.1");
- test_sockopt_value("IP_MULTICAST_IF set to 127.0.0.1",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ address.s_addr = inet_addr("127.0.0.1");
+ test_sockopt_value_ext("IP_MULTICAST_IF set to 127.0.0.1 mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
/* Errors */
diff --git a/test_tools/multicast/sockopt_utils.h b/test_tools/multicast/sockopt_utils.h
index 6486f71..330b765 100644
--- a/test_tools/multicast/sockopt_utils.h
+++ b/test_tools/multicast/sockopt_utils.h
@@ -122,11 +122,23 @@ void test_setsockopt(char* test_name, int optname, void *optval,
printf("%s=pass\n", test_name);
}
+/* In some cases setsockopt and getsockopt can work with different data
+ * structures, e.g. setsockopt() can use 'struct ip_mreqn' for setting
+ * the source ip address and getsockopt() always returns 'struct in_addr'.
+ * This function is provided to deal with such situation.
+ */
+void test_sockopt_value_ext(char* test_name, int optname,
+ void *optval, socklen_t optlen,
+ void *expval, socklen_t explen)
+{
+ test_setsockopt(test_name, optname, optval, optlen);
+ test_getsockopt(test_name, optname, expval, explen);
+}
+
void test_sockopt_value(char* test_name, int optname,
void *optval, socklen_t optlen)
{
- test_setsockopt(test_name, optname, optval, optlen);
- test_getsockopt(test_name, optname, optval, optlen);
+ test_sockopt_value_ext(test_name, optname, optval, optlen, optval, optlen);
}
void test_setsockopt_error(char* test_name, int optname, void *optval,
--
1.9.3
8 years, 7 months
[PATCH] test_tools: fix IP_MULTICAST_IF sockopt bug
by Jan Tluka
Test for setting socket option IP_MULTICAST_IF using struct ip_mreqn is buggy.
System call setsockopt() can use both in_addr and ip_mreqn structs but getsockopt()
returns struct in_addr only. Therefore the test failed because the size
of the passed and returned structure did not match.
I added second function test_sockopt_value2() that takes additional two
parameters that are expected when getsockopt() is called.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
test_tools/multicast/offline/sockopt_if.c | 10 ++++++----
test_tools/multicast/sockopt_utils.h | 13 +++++++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/test_tools/multicast/offline/sockopt_if.c b/test_tools/multicast/offline/sockopt_if.c
index 2396629..70e2df7 100644
--- a/test_tools/multicast/offline/sockopt_if.c
+++ b/test_tools/multicast/offline/sockopt_if.c
@@ -39,14 +39,16 @@ void test_if()
struct ip_mreqn mreqn;
mreqn.imr_multiaddr.s_addr = inet_addr("239.1.2.3");
mreqn.imr_address.s_addr = INADDR_ANY;
+ address.s_addr = INADDR_ANY;
mreqn.imr_ifindex = 0;
- test_sockopt_value("IP_MULTICAST_IF set to INADDR_ANY",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ test_sockopt_value2("IP_MULTICAST_IF set to INADDR_ANY mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
mreqn.imr_address.s_addr = inet_addr("127.0.0.1");
- test_sockopt_value("IP_MULTICAST_IF set to 127.0.0.1",
- IP_MULTICAST_IF, &mreqn, sizeof(mreqn));
+ address.s_addr = inet_addr("127.0.0.1");
+ test_sockopt_value2("IP_MULTICAST_IF set to 127.0.0.1 mreqn",
+ IP_MULTICAST_IF, &mreqn, sizeof(mreqn), &address, size);
/* Errors */
diff --git a/test_tools/multicast/sockopt_utils.h b/test_tools/multicast/sockopt_utils.h
index 6486f71..d722cef 100644
--- a/test_tools/multicast/sockopt_utils.h
+++ b/test_tools/multicast/sockopt_utils.h
@@ -129,6 +129,19 @@ void test_sockopt_value(char* test_name, int optname,
test_getsockopt(test_name, optname, optval, optlen);
}
+/* In some cases setsockopt and getsockopt can work with different data
+ * structures, e.g. setsockopt() can use 'struct ip_mreqn' for setting
+ * the source ip address and getsockopt() always returns 'struct in_addr'.
+ * This function is provided to deal with such situation.
+ */
+void test_sockopt_value2(char* test_name, int optname,
+ void *optval, socklen_t optlen,
+ void *expval, socklen_t explen)
+{
+ test_setsockopt(test_name, optname, optval, optlen);
+ test_getsockopt(test_name, optname, expval, explen);
+}
+
void test_setsockopt_error(char* test_name, int optname, void *optval,
socklen_t optlen, int expected_errorcode)
{
--
1.9.3
8 years, 7 months