Skip to content

Commit b7f9c79

Browse files
authored
fix: Get rid of the testcases spamming mode (#187)
1 parent 66ed140 commit b7f9c79

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

include/klee/Core/TerminationTypes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ enum Reason {
9898
CovCheck,
9999
NoMoreStates,
100100
ReachedTarget,
101-
UnreachedTarget,
102101
ErrorOnWhichShouldExit,
103102
Interrupt,
104103
MaxDepth,

lib/Core/Executor.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ cl::opt<HaltExecution::Reason> DumpStatesOnHalt(
246246
cl::values(
247247
clEnumValN(HaltExecution::Reason::NotHalt, "none",
248248
"Do not dump test cases for all active states on exit."),
249-
clEnumValN(HaltExecution::Reason::UnreachedTarget, "unreached",
250-
"Dump test cases for all active states on exit if error not "
251-
"reached."),
252249
clEnumValN(HaltExecution::Reason::Unspecified, "all",
253250
"Dump test cases for all active states on exit (default)")),
254251
cl::cat(TestGenCat));
@@ -4451,19 +4448,11 @@ void Executor::decreaseConfidenceFromStoppedStates(
44514448

44524449
void Executor::doDumpStates() {
44534450
auto &states = objectManager->getStates();
4454-
if (DumpStatesOnHalt == HaltExecution::Reason::NotHalt ||
4455-
(DumpStatesOnHalt == HaltExecution::Reason::UnreachedTarget &&
4456-
haltExecution == HaltExecution::Reason::ReachedTarget) ||
4457-
states.empty()) {
4451+
if (DumpStatesOnHalt == HaltExecution::Reason::NotHalt || states.empty()) {
44584452
interpreterHandler->incPathsExplored(states.size());
44594453
return;
44604454
}
44614455

4462-
if (FunctionCallReproduce != "" &&
4463-
haltExecution != HaltExecution::Reason::ReachedTarget) {
4464-
haltExecution = HaltExecution::UnreachedTarget;
4465-
}
4466-
44674456
klee_message("halting execution, dumping remaining states");
44684457
for (const auto &state : objectManager->getStates()) {
44694458
terminateStateEarly(*state, "Execution halting.",

scripts/kleef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def klee_options(
8181
"--function-call-reproduce=reach_error",
8282
# "--max-cycles=0",
8383
# "--tc-type=bug",
84-
"--dump-states-on-halt=unreached", # Explicitly do not dump states
84+
"--dump-states-on-halt=none", # Explicitly do not dump states
8585
"--exit-on-error-type=Assert", # Only generate test cases of type assert
8686
# "--dump-test-case-type=Assert", # Only dump test cases of type assert
8787
"--search=dfs",

tools/klee/main.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,7 @@ void KleeHandler::processTestCase(const ExecutionState &state,
680680
unsigned id = ++m_numTotalTests;
681681
if (!WriteNone &&
682682
(FunctionCallReproduce == "" || strcmp(suffix, "assert.err") == 0 ||
683-
strcmp(suffix, "reachable.err") == 0 ||
684-
(DumpStatesOnHalt == HaltExecution::Reason::UnreachedTarget &&
685-
m_interpreter->getHaltExecution() ==
686-
HaltExecution::Reason::UnreachedTarget))) {
683+
strcmp(suffix, "reachable.err") == 0)) {
687684
KTest ktest;
688685
ktest.numArgs = m_argc;
689686
ktest.args = m_argv;

0 commit comments

Comments
 (0)