From: Ondrej Lichtner <olichtne(a)redhat.com>
The following 3 patches fix a few bug I found while trying to run smoke tests
to check my netlink implementation. These are related to the recent change in
the xml format, and one that was overlooked when I was implementing the NM
support.
Ondrej Lichtner (3):
NmConfigDevice: fix vlan is_nm_managed method
smoke tests: fix expect values
variables.conf: value change from true/false to pass/fail
lnst/Slave/NmConfigDevice.py | 2 +-
recipes/smoke/lib/task-bg.xml | 4 ++--
recipes/smoke/lib/task-ping.xml | 4 ++--
recipes/smoke/lib/variables.conf | 14 +++++++-------
4 files changed, 12 insertions(+), 12 deletions(-)
--
1.8.3.1
Show replies by date
From: Ondrej Lichtner <olichtne(a)redhat.com>
When accessing the vlan slave interface I used the index 1 instead of 0.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NmConfigDevice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index 7a236f9..3d12c55 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -581,7 +581,7 @@ class NmConfigDeviceVlan(NmConfigDeviceGeneric):
managed = super(NmConfigDeviceBond, cls).is_nm_managed(netdev,
config)
else:
- slave_id = get_slaves(netdev)[1]
+ slave_id = get_slaves(netdev)[0]
netdev = config[slave_id]
managed = is_nm_managed(netdev, config)
--
1.8.3.1
From: Ondrej Lichtner <olichtne(a)redhat.com>
Values of the expect attribute are generated based on values stored in
the variables.conf file.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/smoke/lib/task-bg.xml | 4 ++--
recipes/smoke/lib/task-ping.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/recipes/smoke/lib/task-bg.xml b/recipes/smoke/lib/task-bg.xml
index eea6ef3..b9388d2 100644
--- a/recipes/smoke/lib/task-bg.xml
+++ b/recipes/smoke/lib/task-bg.xml
@@ -8,5 +8,5 @@
</options>
</run>
<ctl_wait seconds="5"/>
- <intr bg_id="1" expect="fail" machine="1"
timeout="30"/>
-</task>
\ No newline at end of file
+ <intr bg_id="1" expect="#icmp_result#" machine="1"
timeout="30"/>
+</task>
diff --git a/recipes/smoke/lib/task-ping.xml b/recipes/smoke/lib/task-ping.xml
index 8e84d7e..1c275f7 100644
--- a/recipes/smoke/lib/task-ping.xml
+++ b/recipes/smoke/lib/task-ping.xml
@@ -1,5 +1,5 @@
<task>
- <run expect="fail" machine="1" module="IcmpPing"
timeout="30">
+ <run expect="#icmp_result#" machine="1"
module="IcmpPing" timeout="30">
<options>
<option name="addr" value="{ip(2,testiface)}"/>
<option name="count" value="40"/>
@@ -7,4 +7,4 @@
<option name="limit_rate" value="95"/>
</options>
</run>
-</task>
\ No newline at end of file
+</task>
--
1.8.3.1
From: Ondrej Lichtner <olichtne(a)redhat.com>
The recent change of the xml format changed the accepted values of the
expect attribute from true/false to pass/fail.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
recipes/smoke/lib/variables.conf | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/recipes/smoke/lib/variables.conf b/recipes/smoke/lib/variables.conf
index a0ad9f9..0c9b066 100644
--- a/recipes/smoke/lib/variables.conf
+++ b/recipes/smoke/lib/variables.conf
@@ -1,14 +1,14 @@
[defaults]
-icmp_result = true
+icmp_result=pass
[bond-vlan]
-icmp_result=false
+icmp_result=fail
[team-vlan]
-icmp_result=false
+icmp_result=fail
[eth-vlan]
-icmp_result=false
+icmp_result=fail
[vlan-bond]
-icmp_result=false
+icmp_result=fail
[vlan-team]
-icmp_result=false
+icmp_result=fail
[vlan-eth]
-icmp_result=false
+icmp_result=fail
--
1.8.3.1