This patch contains updates of the smoke test suite to reflect the
recent facelift of the command sequences.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
recipes/smoke/generate-recipes.py | 6 +++---
recipes/smoke/lib/conf-bond.xml | 2 +-
recipes/smoke/lib/conf-eth.xml | 2 +-
recipes/smoke/lib/conf-team.xml | 2 +-
recipes/smoke/lib/conf-vlan.xml | 2 +-
recipes/smoke/lib/recipe-temp.xml | 2 +-
recipes/smoke/lib/seq-bg.xml | 13 -------------
recipes/smoke/lib/seq-exec.xml | 7 -------
recipes/smoke/lib/seq-ping.xml | 10 ----------
recipes/smoke/lib/seq-sysconfig.xml | 10 ----------
recipes/smoke/lib/task-bg.xml | 12 ++++++++++++
recipes/smoke/lib/task-config.xml | 10 ++++++++++
recipes/smoke/lib/task-exec.xml | 6 ++++++
recipes/smoke/lib/task-ping.xml | 10 ++++++++++
14 files changed, 46 insertions(+), 48 deletions(-)
delete mode 100644 recipes/smoke/lib/seq-bg.xml
delete mode 100644 recipes/smoke/lib/seq-exec.xml
delete mode 100644 recipes/smoke/lib/seq-ping.xml
delete mode 100644 recipes/smoke/lib/seq-sysconfig.xml
create mode 100644 recipes/smoke/lib/task-bg.xml
create mode 100644 recipes/smoke/lib/task-config.xml
create mode 100644 recipes/smoke/lib/task-exec.xml
create mode 100644 recipes/smoke/lib/task-ping.xml
diff --git a/recipes/smoke/generate-recipes.py b/recipes/smoke/generate-recipes.py
index e81d265..c7eedb9 100755
--- a/recipes/smoke/generate-recipes.py
+++ b/recipes/smoke/generate-recipes.py
@@ -101,10 +101,10 @@ def main():
sequences = ""
for seq in os.listdir(LIB):
- if not re.match("seq-.*", seq):
+ if not re.match("task-.*", seq):
continue
- print "Found command sequence %s%s" % (LIB, seq)
- sequences += "\n <command_sequence
source=\"%s%s\"/>" % (LIB, seq)
+ print "Found a task: %s%s" % (LIB, seq)
+ sequences += "\n <task source=\"%s%s\"/>" % (LIB,
seq)
conf_files = [LIB+i for i in os.listdir(LIB) if re.match("conf-.*", i)]
for conf in conf_files:
diff --git a/recipes/smoke/lib/conf-bond.xml b/recipes/smoke/lib/conf-bond.xml
index 269b123..c60ea62 100644
--- a/recipes/smoke/lib/conf-bond.xml
+++ b/recipes/smoke/lib/conf-bond.xml
@@ -10,4 +10,4 @@
<address value="{$testip}"/>
</addresses>
</bond>
-</interfaces>
+</interfaces>
\ No newline at end of file
diff --git a/recipes/smoke/lib/conf-eth.xml b/recipes/smoke/lib/conf-eth.xml
index a4562ea..d718d8c 100644
--- a/recipes/smoke/lib/conf-eth.xml
+++ b/recipes/smoke/lib/conf-eth.xml
@@ -4,4 +4,4 @@
<address value="{$testip}"/>
</addresses>
</eth>
-</interfaces>
+</interfaces>
\ No newline at end of file
diff --git a/recipes/smoke/lib/conf-team.xml b/recipes/smoke/lib/conf-team.xml
index 8493e09..796d6e8 100644
--- a/recipes/smoke/lib/conf-team.xml
+++ b/recipes/smoke/lib/conf-team.xml
@@ -17,4 +17,4 @@
<address value="{$testip}"/>
</addresses>
</team>
-</interfaces>
+</interfaces>
\ No newline at end of file
diff --git a/recipes/smoke/lib/conf-vlan.xml b/recipes/smoke/lib/conf-vlan.xml
index 542b167..e21573e 100644
--- a/recipes/smoke/lib/conf-vlan.xml
+++ b/recipes/smoke/lib/conf-vlan.xml
@@ -11,4 +11,4 @@
<address value="{$testip}"/>
</addresses>
</vlan>
-</interfaces>
+</interfaces>
\ No newline at end of file
diff --git a/recipes/smoke/lib/recipe-temp.xml b/recipes/smoke/lib/recipe-temp.xml
index ab06173..954b7ef 100644
--- a/recipes/smoke/lib/recipe-temp.xml
+++ b/recipes/smoke/lib/recipe-temp.xml
@@ -14,4 +14,4 @@
</machine>
</machines>
#SEQUENCES#
-</lnstrecipe>
+</lnstrecipe>
\ No newline at end of file
diff --git a/recipes/smoke/lib/seq-bg.xml b/recipes/smoke/lib/seq-bg.xml
deleted file mode 100644
index 7f3ec80..0000000
--- a/recipes/smoke/lib/seq-bg.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<command_sequence>
- <command machine_id="1" timeout="30" type="test"
- value="IcmpPing" bg_id="1">
- <options>
- <option name="addr" value="{ip(2,testiface)}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0.2"/>
- <option name="limit_rate" value="95"/>
- </options>
- </command>
- <command type="ctl_wait" value="5"/>
- <command machine_id="1" timeout="30" type="intr"
pass_result="#icmp_result#" value="1"/>
-</command_sequence>
diff --git a/recipes/smoke/lib/seq-exec.xml b/recipes/smoke/lib/seq-exec.xml
deleted file mode 100644
index 9cd014e..0000000
--- a/recipes/smoke/lib/seq-exec.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<command_sequence>
- <command machine_id="1" timeout="30" type="exec"
- value="[ `ip -o link | grep {devname(1,testiface)} | wc -l` -gt 0
]"/>
- <!-- This does not yet work for non-eth devices -->
- <!--<command machine_id="1" timeout="30"
type="exec"
- value="[ `ip -o link | grep {hwaddr(1,testiface)} | wc -l` -gt 0
]"/>-->
-</command_sequence>
diff --git a/recipes/smoke/lib/seq-ping.xml b/recipes/smoke/lib/seq-ping.xml
deleted file mode 100644
index ec8e340..0000000
--- a/recipes/smoke/lib/seq-ping.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<command_sequence>
- <command machine_id="1" timeout="30" type="test"
value="IcmpPing" pass_result="#icmp_result#">
- <options>
- <option name="addr" value="{ip(2,testiface)}"/>
- <option name="count" value="40"/>
- <option name="interval" value="0.2"/>
- <option name="limit_rate" value="95"/>
- </options>
- </command>
-</command_sequence>
diff --git a/recipes/smoke/lib/seq-sysconfig.xml b/recipes/smoke/lib/seq-sysconfig.xml
deleted file mode 100644
index f901b7b..0000000
--- a/recipes/smoke/lib/seq-sysconfig.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<command_sequence>
- <command machine_id="1" type="system_config">
- <options>
- <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="5"/>
- <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="6"/>
- <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="7"/>
- <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="8"/>
- </options>
- </command>
-</command_sequence>
diff --git a/recipes/smoke/lib/task-bg.xml b/recipes/smoke/lib/task-bg.xml
new file mode 100644
index 0000000..eea6ef3
--- /dev/null
+++ b/recipes/smoke/lib/task-bg.xml
@@ -0,0 +1,12 @@
+<task>
+ <run bg_id="1" machine="1" module="IcmpPing"
timeout="30">
+ <options>
+ <option name="addr" value="{ip(2,testiface)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0.2"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+ <ctl_wait seconds="5"/>
+ <intr bg_id="1" expect="fail" machine="1"
timeout="30"/>
+</task>
\ No newline at end of file
diff --git a/recipes/smoke/lib/task-config.xml b/recipes/smoke/lib/task-config.xml
new file mode 100644
index 0000000..25a0a6a
--- /dev/null
+++ b/recipes/smoke/lib/task-config.xml
@@ -0,0 +1,10 @@
+<task>
+ <config machine="1">
+ <options>
+ <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="5"/>
+ <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="6"/>
+ <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="7"/>
+ <option name="/proc/sys/net/ipv4/igmp_max_memberships"
value="8"/>
+ </options>
+ </config>
+</task>
\ No newline at end of file
diff --git a/recipes/smoke/lib/task-exec.xml b/recipes/smoke/lib/task-exec.xml
new file mode 100644
index 0000000..9fae49f
--- /dev/null
+++ b/recipes/smoke/lib/task-exec.xml
@@ -0,0 +1,6 @@
+<task>
+ <run command="[ `ip -o link | grep {devname(1,testiface)} | wc -l` -gt 0
]" machine="1" timeout="30"/>
+ <!-- This does not yet work for non-eth devices -->
+ <!--<command machine_id="1" timeout="30"
type="exec"
+ value="[ `ip -o link | grep {hwaddr(1,testiface)} | wc -l` -gt 0
]"/>-->
+</task>
\ No newline at end of file
diff --git a/recipes/smoke/lib/task-ping.xml b/recipes/smoke/lib/task-ping.xml
new file mode 100644
index 0000000..8e84d7e
--- /dev/null
+++ b/recipes/smoke/lib/task-ping.xml
@@ -0,0 +1,10 @@
+<task>
+ <run expect="fail" machine="1" module="IcmpPing"
timeout="30">
+ <options>
+ <option name="addr" value="{ip(2,testiface)}"/>
+ <option name="count" value="40"/>
+ <option name="interval" value="0.2"/>
+ <option name="limit_rate" value="95"/>
+ </options>
+ </run>
+</task>
\ No newline at end of file
--
1.8.3.1