[Openais] [PATCH corosync 1/4] CTS: add --rrp-bindaddr to enable rrp tests.
Angus Salkeld
asalkeld at redhat.com
Mon Apr 12 20:39:01 PDT 2010
This allows you to run rrp only if you tell it what the extra bindaddr
is (remove some ugly hardcoded ip addresses).
-Angus
Signed-off-by: Angus Salkeld <asalkeld at redhat.com>
---
cts/corolab.py | 6 ++++++
cts/corotests.py | 34 ++++++++++++++++++----------------
2 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/cts/corolab.py b/cts/corolab.py
index 83547de..340c751 100755
--- a/cts/corolab.py
+++ b/cts/corolab.py
@@ -70,6 +70,7 @@ def usage(arg):
print "\t [--nodes 'node list'], list of cluster nodes separated by whitespace"
print "\t [--limit-nodes max], only use the first 'max' cluster nodes supplied with --nodes"
print "\t [--logfile path], where should the test software look for logs from cluster nodes"
+ print "\t [--rrp-bindaddr addr], extra interface used for rrp, provide the bindaddr"
print "\t [--outputfile path], optional location for the test software to write logs to"
print "\t [--syslog-facility name], which syslog facility should the test software log to"
print "\t [--choose testcase-name], run only the named test"
@@ -111,6 +112,7 @@ class CoroLabEnvironment(CtsLab):
self["DoBSC"] = 0
self["use_logd"] = 0
self["oprofile"] = []
+ self["RrpBindAddr"] = None
self["warn-inactive"] = 0
self["ListTests"] = 0
self["benchmark"] = 0
@@ -179,6 +181,10 @@ if __name__ == '__main__':
skipthis=1
Environment["OutputFile"] = args[i+1]
+ elif args[i] == "--rrp-bindaddr":
+ skipthis=1
+ Environment["RrpBindAddr"] = args[i+1]
+
elif args[i] == "--oprofile":
skipthis=1
Environment["oprofile"] = args[i+1].split(' ')
diff --git a/cts/corotests.py b/cts/corotests.py
index d0a4705..1fbbfa9 100644
--- a/cts/corotests.py
+++ b/cts/corotests.py
@@ -926,22 +926,24 @@ def CoroTestList(cm, audits):
#f['quorum/provider'] = 'corosync_quorum_ykd'
#configs.append(f)
-
- g = {}
- g['totem/rrp_mode'] = 'passive'
- g['totem/interface[2]/ringnumber'] = '1'
- g['totem/interface[2]/bindnetaddr'] = '192.168.200.0'
- g['totem/interface[2]/mcastaddr'] = '226.94.1.2'
- g['totem/interface[2]/mcastport'] = '5405'
- configs.append(g)
-
- h = {}
- h['totem/rrp_mode'] = 'active'
- h['totem/interface[2]/ringnumber'] = '1'
- h['totem/interface[2]/bindnetaddr'] = '192.168.200.0'
- h['totem/interface[2]/mcastaddr'] = '226.94.1.2'
- h['totem/interface[2]/mcastport'] = '5405'
- configs.append(h)
+ if not cm.Env["RrpBindAddr"] is None:
+ g = {}
+ g['totem/rrp_mode'] = 'passive'
+ g['totem/interface[2]/ringnumber'] = '1'
+ g['totem/interface[2]/bindnetaddr'] = cm.Env["RrpBindAddr"]
+ g['totem/interface[2]/mcastaddr'] = '226.94.1.2'
+ g['totem/interface[2]/mcastport'] = '5405'
+ configs.append(g)
+
+ h = {}
+ h['totem/rrp_mode'] = 'active'
+ h['totem/interface[2]/ringnumber'] = '1'
+ h['totem/interface[2]/bindnetaddr'] = cm.Env["RrpBindAddr"]
+ h['totem/interface[2]/mcastaddr'] = '226.94.1.2'
+ h['totem/interface[2]/mcastport'] = '5405'
+ configs.append(h)
+ else:
+ print 'Not including rrp tests. Use --rrp-binaddr to enable them.'
num=1
for cfg in configs:
--
1.6.6.1
More information about the Openais
mailing list