From f93c42ba13ee2836d4e7b35dbd8ef83c72fa4be4 Mon Sep 17 00:00:00 2001 From: agroce Date: Fri, 17 May 2019 11:52:23 -0700 Subject: [PATCH] fix longstanding bug where passing tests are always saved in nofork fuzzing --- src/include/deepstate/DeepState.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/deepstate/DeepState.h b/src/include/deepstate/DeepState.h index 2204a2f..a85ce75 100644 --- a/src/include/deepstate/DeepState.h +++ b/src/include/deepstate/DeepState.h @@ -603,7 +603,9 @@ static int DeepState_RunTestNoFork(struct DeepState_TestInfo *test) { } else { DeepState_LogFormat(DeepState_LogTrace, "Passed: %s", test->test_name); if (HAS_FLAG_output_test_dir) { - DeepState_SavePassingTest(); + if (!FLAGS_fuzz || FLAGS_fuzz_save_passing) { + DeepState_SavePassingTest(); + } } return(DeepState_TestRunPass); }