]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushTester: test fewer inputs when running crushtool 6192/head
authorSage Weil <sage@redhat.com>
Fri, 21 Aug 2015 20:40:34 +0000 (16:40 -0400)
committerLoic Dachary <ldachary@redhat.com>
Wed, 7 Oct 2015 16:09:48 +0000 (18:09 +0200)
If there are a lot of crush rules (say, 100) then the test can
take a long time.  100 values per rule should be enough to catch
most issues.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 0f82f461b33d93d868e185912a2c7e4074d06900)

Conflicts:
src/crush/CrushTester.cc
  in hammer the crushtool validation is via a shell
       and not via an internal subprocess utility

src/crush/CrushTester.cc

index 24db70ee6d8132be712dc700399a216f44c81e56..d2be1f045731908e585f03eb111de3b6dddbe936 100644 (file)
@@ -373,6 +373,10 @@ int CrushTester::test_with_crushtool(const string& crushtool,
   cmd_args.push_back("--test");
   cmd_args.push_back("--check");
   cmd_args.push_back(opt_max_id.c_str());
+  cmd_args.push_back("--min-x");
+  cmd_args.push_back("1");
+  cmd_args.push_back("--max-x");
+  cmd_args.push_back("50");
   if (ruleset >= 0) {
     cmd_args.push_back("--ruleset");
     cmd_args.push_back(stringify(ruleset).c_str());