Much nicer fuzzer output with status updates
This commit is contained in:
parent
63952ff067
commit
68307c1111
@ -690,19 +690,14 @@ int DeepState_Fuzz(void){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int last_status = 0;
|
||||||
|
|
||||||
while (diff < FLAGS_timeout) {
|
while (diff < FLAGS_timeout) {
|
||||||
i++;
|
i++;
|
||||||
if ((i > 1) && ((i & (i - 1)) == 0)) {
|
if ((diff != last_status) && ((diff % 30) == 0) ) {
|
||||||
if (diff > 1) {
|
DeepState_LogFormat(DeepState_LogInfo, "Ran %u tests in %u seconds (%u tests/second). %d failed tests so far.",
|
||||||
DeepState_LogFormat(DeepState_LogInfo, "Ran %u tests in %u seconds. %d failed tests so far.",
|
i, diff, i/diff, num_failed_tests);
|
||||||
i, diff, num_failed_tests);
|
last_status = diff;
|
||||||
} else if (diff == 1) {
|
|
||||||
DeepState_LogFormat(DeepState_LogInfo, "Ran %u tests in %u second. %d failed tests so far.",
|
|
||||||
i, diff, num_failed_tests);
|
|
||||||
} else {
|
|
||||||
DeepState_LogFormat(DeepState_LogInfo, "Ran %u tests in < 1 second. %d failed tests so far.",
|
|
||||||
i, diff, num_failed_tests);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
num_failed_tests += DeepState_FuzzOneTestCase(test);
|
num_failed_tests += DeepState_FuzzOneTestCase(test);
|
||||||
|
|
||||||
@ -710,8 +705,8 @@ int DeepState_Fuzz(void){
|
|||||||
diff = current-start;
|
diff = current-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeepState_LogFormat(DeepState_LogInfo, "Done fuzzing! Ran %u tests. %d failed tests.",
|
DeepState_LogFormat(DeepState_LogInfo, "Done fuzzing! Ran %u tests (%u tests/second). %d failed tests.",
|
||||||
i, num_failed_tests);
|
i, i/diff, num_failed_tests);
|
||||||
|
|
||||||
return num_failed_tests;
|
return num_failed_tests;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user