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) {
80
80
let mut dest_port = write_src_port;
81
81
let mut header = [ 0 ; 1 ] ;
82
82
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 (
85
89
UdpOpFlags :: USE_FILTER ,
86
90
Some ( & mut dest_ip) ,
87
91
Some ( & mut dest_port) ,
88
92
Some ( & mut src_ip) ,
89
93
Some ( & mut src_port) ,
90
94
Some ( & mut header) ,
91
95
& 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 ( ) ;
94
104
95
105
// Check the header.
96
106
assert_eq ! ( header[ 0 ] as usize , payload. len( ) ) ;
You can’t perform that action at this time.
0 commit comments