mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-18 12:48:07 +00:00
address clippy issues in latest rust release (#884)
This commit is contained in:
@ -51,19 +51,19 @@ pub fn build_analysis_config(
|
||||
.monitor_count(&event_sender)?;
|
||||
|
||||
let config = Config {
|
||||
target_exe,
|
||||
target_options,
|
||||
crashes,
|
||||
input_queue,
|
||||
analyzer_exe,
|
||||
analyzer_options,
|
||||
analyzer_env,
|
||||
target_exe,
|
||||
target_options,
|
||||
input_queue,
|
||||
crashes,
|
||||
analysis,
|
||||
tools,
|
||||
common,
|
||||
reports,
|
||||
unique_reports,
|
||||
no_repro,
|
||||
common,
|
||||
};
|
||||
|
||||
Ok(config)
|
||||
|
@ -50,21 +50,21 @@ pub fn build_fuzz_config(
|
||||
let ensemble_sync_delay = None;
|
||||
|
||||
let config = Config {
|
||||
tools,
|
||||
generator_exe,
|
||||
generator_env,
|
||||
generator_options,
|
||||
readonly_inputs,
|
||||
crashes,
|
||||
tools,
|
||||
target_exe,
|
||||
target_env,
|
||||
target_options,
|
||||
target_timeout,
|
||||
readonly_inputs,
|
||||
crashes,
|
||||
ensemble_sync_delay,
|
||||
check_asan_log,
|
||||
check_debugger,
|
||||
check_retry_count,
|
||||
rename_output,
|
||||
ensemble_sync_delay,
|
||||
common,
|
||||
};
|
||||
|
||||
|
@ -48,8 +48,8 @@ pub fn build_fuzz_config(
|
||||
target_options,
|
||||
target_workers,
|
||||
ensemble_sync_delay,
|
||||
expect_crash_on_failure,
|
||||
check_fuzzer_help,
|
||||
expect_crash_on_failure,
|
||||
common,
|
||||
};
|
||||
|
||||
|
@ -41,12 +41,12 @@ pub fn build_merge_config(
|
||||
target_exe,
|
||||
target_env,
|
||||
target_options,
|
||||
check_fuzzer_help,
|
||||
input_queue,
|
||||
common,
|
||||
inputs,
|
||||
unique_inputs,
|
||||
preserve_existing_outputs,
|
||||
check_fuzzer_help,
|
||||
common,
|
||||
};
|
||||
|
||||
Ok(config)
|
||||
|
@ -487,8 +487,8 @@ impl TerminalUi {
|
||||
Ok(UiLoopState {
|
||||
logs,
|
||||
file_count,
|
||||
terminal,
|
||||
log_event_receiver,
|
||||
terminal,
|
||||
events,
|
||||
..ui_state
|
||||
})
|
||||
|
@ -61,10 +61,10 @@ pub async fn init_task_heartbeat(
|
||||
.queue_client
|
||||
.enqueue(Heartbeat {
|
||||
task_id,
|
||||
data,
|
||||
job_id,
|
||||
machine_id,
|
||||
machine_name,
|
||||
data,
|
||||
})
|
||||
.await;
|
||||
},
|
||||
|
@ -85,14 +85,15 @@ impl GenericRegressionTask {
|
||||
let heartbeat_client = self.config.common.init_heartbeat().await?;
|
||||
|
||||
let mut report_dirs = vec![];
|
||||
for dir in &[
|
||||
for dir in vec![
|
||||
&self.config.reports,
|
||||
&self.config.unique_reports,
|
||||
&self.config.no_repro,
|
||||
] {
|
||||
if let Some(dir) = dir {
|
||||
report_dirs.push(dir);
|
||||
}
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
report_dirs.push(dir);
|
||||
}
|
||||
common::run(
|
||||
heartbeat_client,
|
||||
|
@ -79,14 +79,15 @@ impl LibFuzzerRegressionTask {
|
||||
|
||||
pub async fn run(&self) -> Result<()> {
|
||||
let mut report_dirs = vec![];
|
||||
for dir in &[
|
||||
for dir in vec![
|
||||
&self.config.reports,
|
||||
&self.config.unique_reports,
|
||||
&self.config.no_repro,
|
||||
] {
|
||||
if let Some(dir) = dir {
|
||||
report_dirs.push(dir);
|
||||
}
|
||||
]
|
||||
.into_iter()
|
||||
.flatten()
|
||||
{
|
||||
report_dirs.push(dir);
|
||||
}
|
||||
|
||||
let heartbeat_client = self.config.common.init_heartbeat().await?;
|
||||
|
@ -28,42 +28,42 @@ pub async fn read_stats(output_path: impl AsRef<Path>) -> Result<Vec<EventData>,
|
||||
stats.push(EventData::Mode(value.to_string()));
|
||||
}
|
||||
"paths_total" => {
|
||||
if let Ok(value) = u64::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u64>() {
|
||||
stats.push(EventData::CoveragePaths(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
}
|
||||
}
|
||||
"fuzzer_pid" => {
|
||||
if let Ok(value) = u32::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u32>() {
|
||||
stats.push(EventData::Pid(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
}
|
||||
}
|
||||
"execs_done" => {
|
||||
if let Ok(value) = u64::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u64>() {
|
||||
stats.push(EventData::Count(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
}
|
||||
}
|
||||
"paths_favored" => {
|
||||
if let Ok(value) = u64::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u64>() {
|
||||
stats.push(EventData::CoveragePathsFavored(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
}
|
||||
}
|
||||
"paths_found" => {
|
||||
if let Ok(value) = u64::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u64>() {
|
||||
stats.push(EventData::CoveragePathsFound(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
}
|
||||
}
|
||||
"paths_imported" => {
|
||||
if let Ok(value) = u64::from_str_radix(&value, 10) {
|
||||
if let Ok(value) = value.parse::<u64>() {
|
||||
stats.push(EventData::CoveragePathsImported(value));
|
||||
} else {
|
||||
error!("unable to parse telemetry: {:?} {:?}", name, value);
|
||||
|
Reference in New Issue
Block a user