From: Samuel Just Date: Fri, 6 Dec 2013 19:02:04 +0000 (-0800) Subject: test/osd/TestRados.cc: skip 0 weight ops X-Git-Tag: v0.78~286^2~42 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0885880b303e8ef339abea42bc4d06f5613a9566;p=ceph.git test/osd/TestRados.cc: skip 0 weight ops Signed-off-by: Samuel Just --- diff --git a/src/test/osd/TestRados.cc b/src/test/osd/TestRados.cc index 1def0622f10f..79c367c58e8a 100644 --- a/src/test/osd/TestRados.cc +++ b/src/test/osd/TestRados.cc @@ -294,11 +294,6 @@ int main(int argc, char **argv) break; } } - if (ec_pool && !op_types[j].ec_pool_valid) { - cerr << "Error: cannot use op type " << op_types[j].name - << " with --ec-pool" << std::endl; - exit(1); - } if (!op_types[j].name) { cerr << "unknown op " << argv[i] << std::endl; exit(1); @@ -307,9 +302,15 @@ int main(int argc, char **argv) if (weight < 0) { cerr << "Weights must be nonnegative." << std::endl; return 1; + } else if (weight > 0) { + if (ec_pool && !op_types[j].ec_pool_valid) { + cerr << "Error: cannot use op type " << op_types[j].name + << " with --ec-pool" << std::endl; + exit(1); + } + cout << "adding op weight " << op_types[j].name << " -> " << weight << std::endl; + op_weights.insert(pair(op_types[j].op, weight)); } - cout << "adding op weight " << op_types[j].name << " -> " << weight << std::endl; - op_weights.insert(pair(op_types[j].op, weight)); } else { cerr << "unknown arg " << argv[i] << std::endl; //usage();