This repository was archived by the owner on Nov 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,12 @@ async fn validate_libfuzzer(config: ValidationConfig) -> Result<()> {
6464 let libfuzzer = LibFuzzer :: new (
6565 & config. target_exe ,
6666 config. target_options . clone ( ) ,
67- config. target_env . into_iter ( ) . collect ( ) ,
67+ config. target_env . iter ( ) . cloned ( ) . collect ( ) ,
6868 config
6969 . setup_folder
70- . unwrap_or ( config. target_exe . parent ( ) . unwrap ( ) . to_path_buf ( ) ) ,
70+ . clone ( )
71+ . or_else ( || config. target_exe . parent ( ) . map ( |p| p. to_path_buf ( ) ) )
72+ . expect ( "invalid target_exe" ) ,
7173 None :: < & PathBuf > ,
7274 MachineIdentity {
7375 machine_id : Uuid :: nil ( ) ,
@@ -103,10 +105,12 @@ async fn get_logs(config: ValidationConfig) -> Result<()> {
103105 let libfuzzer = LibFuzzer :: new (
104106 & config. target_exe ,
105107 config. target_options . clone ( ) ,
106- config. target_env . into_iter ( ) . collect ( ) ,
108+ config. target_env . iter ( ) . cloned ( ) . collect ( ) ,
107109 config
108110 . setup_folder
109- . unwrap_or ( config. target_exe . parent ( ) . unwrap ( ) . to_path_buf ( ) ) ,
111+ . clone ( )
112+ . or_else ( || config. target_exe . parent ( ) . map ( |p| p. to_path_buf ( ) ) )
113+ . expect ( "invalid setup_folder" ) ,
110114 None :: < & PathBuf > ,
111115 MachineIdentity {
112116 machine_id : Uuid :: nil ( ) ,
Original file line number Diff line number Diff line change @@ -422,8 +422,8 @@ impl TaskLogger {
422422 } ) => break ,
423423 Ok ( c) => c,
424424 Err ( e) => {
425- error ! ( "{}" , e) ;
426- break ;
425+ error ! ( "task logger failure {}" , e) ;
426+ return Err ( e ) ;
427427 }
428428 } ;
429429 }
@@ -440,7 +440,10 @@ pub struct SpawnedLogger {
440440
441441impl SpawnedLogger {
442442 pub async fn flush_and_stop ( self , timeout : Duration ) -> Result < ( ) > {
443- let _ = tokio:: time:: timeout ( timeout, self . logger_handle ) . await ;
443+ if let Ok ( Err ( e) ) = tokio:: time:: timeout ( timeout, self . logger_handle ) . await {
444+ error ! ( "failed to flush and stop task logger {}" , e) ;
445+ return Err ( e. into ( ) ) ;
446+ }
444447 Ok ( ( ) )
445448 }
446449}
You can’t perform that action at this time.
0 commit comments