mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
enable setting ensemble sync duration timer (#229)
This commit is contained in:
@ -45,6 +45,8 @@ pub fn run(args: &clap::ArgMatches) -> Result<()> {
|
||||
url: BlobContainerUrl::new(Url::parse("https://contoso.com/crashes")?)?,
|
||||
};
|
||||
|
||||
let ensemble_sync_delay = None;
|
||||
|
||||
let config = Config {
|
||||
inputs,
|
||||
readonly_inputs,
|
||||
@ -53,6 +55,7 @@ pub fn run(args: &clap::ArgMatches) -> Result<()> {
|
||||
target_env,
|
||||
target_options,
|
||||
target_workers,
|
||||
ensemble_sync_delay,
|
||||
common: CommonConfig {
|
||||
heartbeat_queue: None,
|
||||
instrumentation_key: None,
|
||||
|
@ -46,6 +46,7 @@ pub struct GeneratorConfig {
|
||||
#[serde(default)]
|
||||
pub check_retry_count: u64,
|
||||
pub rename_output: bool,
|
||||
pub ensemble_sync_delay: Option<u64>,
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
}
|
||||
@ -61,7 +62,7 @@ pub async fn spawn(config: Arc<GeneratorConfig>) -> Result<(), Error> {
|
||||
dir.init_pull().await?;
|
||||
}
|
||||
|
||||
let sync_task = continuous_sync(&config.readonly_inputs, Pull, None);
|
||||
let sync_task = continuous_sync(&config.readonly_inputs, Pull, config.ensemble_sync_delay);
|
||||
let crash_dir_monitor = config.crashes.monitor_results(new_result);
|
||||
let tester = Tester::new(
|
||||
&config.target_exe,
|
||||
|
@ -45,6 +45,7 @@ pub struct Config {
|
||||
pub target_env: HashMap<String, String>,
|
||||
pub target_options: Vec<String>,
|
||||
pub target_workers: Option<u64>,
|
||||
pub ensemble_sync_delay: Option<u64>,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
@ -197,7 +198,7 @@ impl LibFuzzerFuzzTask {
|
||||
let inputs = inputs.clone();
|
||||
dirs.extend(inputs);
|
||||
}
|
||||
continuous_sync(&dirs, Pull, None).await
|
||||
continuous_sync(&dirs, Pull, self.config.ensemble_sync_delay).await
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ pub struct SupervisorConfig {
|
||||
pub wait_for_files: Option<ContainerType>,
|
||||
pub stats_file: Option<String>,
|
||||
pub stats_format: Option<StatsFormat>,
|
||||
pub ensemble_sync_delay: Option<u64>,
|
||||
#[serde(flatten)]
|
||||
pub common: CommonConfig,
|
||||
}
|
||||
@ -88,7 +89,7 @@ pub async fn spawn(config: SupervisorConfig) -> Result<(), Error> {
|
||||
}
|
||||
}
|
||||
|
||||
let continuous_sync_task = inputs.continuous_sync(Pull, None);
|
||||
let continuous_sync_task = inputs.continuous_sync(Pull, config.ensemble_sync_delay);
|
||||
|
||||
let process = start_supervisor(
|
||||
&runtime_dir.path(),
|
||||
|
Reference in New Issue
Block a user