Skip to content

Conversation

@pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Oct 21, 2025

Currently, the remote-test-client doesn't have a timeout when connecting to the remote-test-server. This means that running tests using it can hang indefinitely which causes issues when running tests on CI, for example.

This PR now sets a default timeout of 5 minutes, meaning that if, for example, TEST_DEVICE_ADDR=<IP:PORT> ./x test --target riscv64gc-unknown-linux-gnu tests/ui is run and the remote-test-server is not reachable by the client, the client will panic after the timeout is reached.

Additionally, the TEST_DEVICE_CONNECT_TIMEOUT env variable can be used to set up the timeout to any value (in seconds).

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 21, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 21, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@pvdrz pvdrz force-pushed the pvdrz/remote-test-client-timeout branch from 1d1f5fd to 799df1c Compare October 22, 2025 14:50
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I no longer have r+ permissions

View changes since this review

total_dur += dur;
}

panic!("Test device at {device_address} timed out");
Copy link
Member

@Enselic Enselic Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be comforting with a test for this. I'm thinking a test where we make the binary connect to non-existing address and use a small timeout and assert on that it panics.

@pvdrz pvdrz requested a review from Enselic October 27, 2025 15:49
@rust-log-analyzer

This comment has been minimized.

@Enselic
Copy link
Member

Enselic commented Oct 29, 2025

I'll assign myself to this one for now.

r? Enselic

@rustbot

This comment was marked as resolved.

@Enselic

This comment was marked as resolved.

@rustbot

This comment was marked as resolved.

@Urgau

This comment was marked as resolved.

@rustbot rustbot assigned Enselic and unassigned Mark-Simulacrum Oct 29, 2025
@pvdrz pvdrz requested a review from Enselic October 29, 2025 16:02
Copy link
Member

@Enselic Enselic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some more things. To avoid confusion for the test later: I would prefer a test that actually invokes the binary rather than having some kind of unit test.

View changes since this review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 30, 2025
@pvdrz pvdrz force-pushed the pvdrz/remote-test-client-timeout branch from b79af79 to 7a6c157 Compare October 30, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants