invert expect_crash_on_failure config option defaults (#792)

This commit is contained in:
bmc-msft 2021-04-12 14:08:36 -04:00 committed by GitHub
parent a0291350c5
commit 338a803a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ use anyhow::Result;
use clap::{App, Arg, SubCommand};
use tokio::sync::mpsc::UnboundedSender;
const DISABLE_EXPECT_CRASH_ON_FAILURE: &str = "disable_expect_crash_on_failure";
const EXPECT_CRASH_ON_FAILURE: &str = "expect_crash_on_failure";
pub fn build_fuzz_config(
args: &clap::ArgMatches<'_>,
@ -35,7 +35,7 @@ pub fn build_fuzz_config(
let target_workers = value_t!(args, "target_workers", usize).unwrap_or_default();
let readonly_inputs = None;
let check_fuzzer_help = args.is_present(CHECK_FUZZER_HELP);
let expect_crash_on_failure = !args.is_present(DISABLE_EXPECT_CRASH_ON_FAILURE);
let expect_crash_on_failure = args.is_present(EXPECT_CRASH_ON_FAILURE);
let ensemble_sync_delay = None;
@ -94,9 +94,9 @@ pub fn build_shared_args() -> Vec<Arg<'static, 'static>> {
Arg::with_name(CHECK_FUZZER_HELP)
.takes_value(false)
.long(CHECK_FUZZER_HELP),
Arg::with_name(DISABLE_EXPECT_CRASH_ON_FAILURE)
Arg::with_name(EXPECT_CRASH_ON_FAILURE)
.takes_value(false)
.long(DISABLE_EXPECT_CRASH_ON_FAILURE),
.long(EXPECT_CRASH_ON_FAILURE),
]
}

View File

@ -61,7 +61,7 @@ pub struct Config {
#[serde(default = "default_bool_true")]
pub check_fuzzer_help: bool,
#[serde(default = "default_bool_true")]
#[serde(default)]
pub expect_crash_on_failure: bool,
#[serde(flatten)]