about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2019-03-15 12:28:49 +0000
committerMartinNowack <martin.nowack@gmail.com>2019-03-15 22:53:39 +0000
commit7885041375ae3b878dbd7bafaf80ad21e38ab2bc (patch)
treec4ecf991da8b6113a381e1ab988b69436f56cb73
parent7400b9363975706ed5407c980f9becbe460634b7 (diff)
downloadklee-7885041375ae3b878dbd7bafaf80ad21e38ab2bc.tar.gz
Renamed --seed-out to --seed-file and --seed-out-dir to --seed-dir, and placed them in the seeding category. Moved options and option categories in Executor.cpp to the klee namespace.
-rw-r--r--include/klee/OptionCategories.h1
-rw-r--r--lib/Core/Executor.cpp2
-rw-r--r--test/Feature/NamedSeedMatching.c2
-rw-r--r--test/Runtime/POSIX/SeedAndFail.c2
-rw-r--r--tools/klee/main.cpp9
5 files changed, 11 insertions, 5 deletions
diff --git a/include/klee/OptionCategories.h b/include/klee/OptionCategories.h
index e107f853..bcf224bd 100644
--- a/include/klee/OptionCategories.h
+++ b/include/klee/OptionCategories.h
@@ -19,6 +19,7 @@
 namespace klee {
   extern llvm::cl::OptionCategory MergeCat;
   extern llvm::cl::OptionCategory ModuleCat;
+  extern llvm::cl::OptionCategory SeedingCat;
   extern llvm::cl::OptionCategory SolvingCat;
 }
 
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 9b2c1b0a..3a022e9d 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -91,7 +91,7 @@
 using namespace llvm;
 using namespace klee;
 
-namespace {
+namespace klee {
 
 /*** Test generation options ***/
 
diff --git a/test/Feature/NamedSeedMatching.c b/test/Feature/NamedSeedMatching.c
index 85c96b74..6f97e4e7 100644
--- a/test/Feature/NamedSeedMatching.c
+++ b/test/Feature/NamedSeedMatching.c
@@ -5,7 +5,7 @@
 // RUN: not test -f %t.klee-out/test000002.ktest
 
 // RUN: rm -rf %t.klee-out-2
-// RUN: %klee --output-dir=%t.klee-out-2 --only-replay-seeds --named-seed-matching --seed-out %t.klee-out/test000001.ktest %t.bc > %t.log
+// RUN: %klee --output-dir=%t.klee-out-2 --only-replay-seeds --named-seed-matching --seed-file %t.klee-out/test000001.ktest %t.bc > %t.log
 // RUN: grep -q "a==3" %t.log
 // RUN: grep -q "b==4" %t.log
 // RUN: grep -q "c==5" %t.log
diff --git a/test/Runtime/POSIX/SeedAndFail.c b/test/Runtime/POSIX/SeedAndFail.c
index 2af86ad1..c9ef0168 100644
--- a/test/Runtime/POSIX/SeedAndFail.c
+++ b/test/Runtime/POSIX/SeedAndFail.c
@@ -2,7 +2,7 @@
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --libc=uclibc --posix-runtime %t.bc --sym-files 1 10  2>%t.log
 // RUN: rm -rf %t.klee-out-2
-// RUN: %klee --output-dir=%t.klee-out-2 --seed-out-dir=%t.klee-out --zero-seed-extension --libc=uclibc --posix-runtime %t.bc --sym-files 1 10 --max-fail 1
+// RUN: %klee --output-dir=%t.klee-out-2 --seed-dir=%t.klee-out --zero-seed-extension --libc=uclibc --posix-runtime %t.bc --sym-files 1 10 --max-fail 1
 // RUN: ls %t.klee-out-2 | grep -c assert | grep 4
 
 #include <string.h>
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index f55a9614..24b96867 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -21,6 +21,7 @@
 #include "klee/Internal/Support/PrintVersion.h"
 #include "klee/Internal/System/Time.h"
 #include "klee/Interpreter.h"
+#include "klee/OptionCategories.h"
 #include "klee/Statistics.h"
 
 #include "llvm/IR/Constants.h"
@@ -255,10 +256,14 @@ namespace {
 
 
   cl::list<std::string>
-  SeedOutFile("seed-out");
+  SeedOutFile("seed-file",
+              cl::desc(".ktest file to be used as seed"),
+              cl::cat(SeedingCat));
 
   cl::list<std::string>
-  SeedOutDir("seed-out-dir");
+  SeedOutDir("seed-dir",
+             cl::desc("Directory with .ktest files to be used as seeds"),
+             cl::cat(SeedingCat));
 
   cl::opt<unsigned>
   MakeConcreteSymbolic("make-concrete-symbolic",