File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
uefi-test-runner/src/proto/network Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,27 @@ pub fn test(bt: &BootServices) {
8080 let mut dest_port = write_src_port;
8181 let mut header = [ 0 ; 1 ] ;
8282 let mut received = [ 0 ; 4 ] ;
83- base_code
84- . udp_read (
83+
84+ // The Windows CI job sometimes fails the read with a timeout error;
85+ // retry a few times before giving up.
86+ let mut read_result = Ok ( 0 ) ;
87+ for i in 0 ..5 {
88+ read_result = base_code. udp_read (
8589 UdpOpFlags :: USE_FILTER ,
8690 Some ( & mut dest_ip) ,
8791 Some ( & mut dest_port) ,
8892 Some ( & mut src_ip) ,
8993 Some ( & mut src_port) ,
9094 Some ( & mut header) ,
9195 & mut received,
92- )
93- . unwrap ( ) ;
96+ ) ;
97+ if read_result. is_ok ( ) {
98+ break ;
99+ }
100+
101+ info ! ( "Read attempt {i} failed: {read_result:?}" ) ;
102+ }
103+ read_result. unwrap ( ) ;
94104
95105 // Check the header.
96106 assert_eq ! ( header[ 0 ] as usize , payload. len( ) ) ;
You can’t perform that action at this time.
0 commit comments