Skip to content

test-runner: Speculative fix for Windows CI timeout #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions uefi-test-runner/src/proto/network/pxe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,27 @@ pub fn test(bt: &BootServices) {
let mut dest_port = write_src_port;
let mut header = [0; 1];
let mut received = [0; 4];
base_code
.udp_read(

// The Windows CI job sometimes fails the read with a timeout error;
// retry a few times before giving up.
let mut read_result = Ok(0);
for i in 0..5 {
read_result = base_code.udp_read(
UdpOpFlags::USE_FILTER,
Some(&mut dest_ip),
Some(&mut dest_port),
Some(&mut src_ip),
Some(&mut src_port),
Some(&mut header),
&mut received,
)
.unwrap();
);
if read_result.is_ok() {
break;
}

info!("Read attempt {i} failed: {read_result:?}");
}
read_result.unwrap();

// Check the header.
assert_eq!(header[0] as usize, payload.len());
Expand Down