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
tests/common/util
: Add possibility to set timeout for UCommand and UChild. Add rstest
with timeout macro to dev dependencies
#4231
Conversation
GNU testsuite comparison:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it! I wonder what the default timeout
should be. Most commands should not take more than a couple of seconds and ideally those have all timeouts, but we don't want intermittent failures of course. The None
that you currently set as default is probably safest.
@sylvestre what do you think of this change and what the default timeout should be?
10 seconds ? |
Any consent regarding the timeout? I can also just try different versions with 10s, 30s, 60s or similar in the ci and then let's see... I also want to add, that the |
10 seconds sounds good. Great work on the fix in rstest! |
d9faf11
to
db855de
Compare
Looks like I'll summarize the test failures from this run https://github.com/uutils/coreutils/actions/runs/3706672957 Summary of the test failures because of a timeout:
How to deal with this? Set the timeout to something higher in the affected tests or increase the default timeout? Summary of the test failures because of stack overflow:
This is most likely due to the Other maybe related test failures:
|
GNU testsuite comparison:
|
1 similar comment
GNU testsuite comparison:
|
I'd say increase the timeout for these specific tests. Not sure about the other failures. |
Ok, I'll set a timeout of 30s for the tests, which are timing out and then let's see. But, maybe we should do both? I'm not sure if we're running into more intermittent timeout failures with the 10s timeout, especially on macos. macos in the ci is sometimes just slow and a simple Regarding the stack size of the Here's a quick update from the last run. The following failures of this run https://github.com/uutils/coreutils/actions/runs/3707853030 add to the existing ones above Timeout related failures
Other maybe related failures
|
Yeah if it causes intermittent failures then it should be increased. |
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
2 similar comments
GNU testsuite comparison:
|
GNU testsuite comparison:
|
I'm pretty sure, that I could fix the intermittent stack overflow errors occurring on I've also increased the default timeout to I'm not sure how to deal with I had some additional ideas regarding runtimes of tests and commands (not necessarily meant to be implemented within this pr). It's sometimes hard to figure out how long a single run takes. So, we could record the runtime of each process in
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
…to development dependencies
…hods in UCommand and UChild. Additional notes: * Set default timeout to 30s * Fix UChild::kill to always fail on timeout if zero
…t in test_factor, test_sort
d85ab0a
to
09c04d9
Compare
GNU testsuite comparison:
|
What do you think? The pr would be ready, so far. |
Yeah looks good! I'm rerunning the android job to see whether it can succeed, but regardless of that result we can merge this in my opinion. |
This pr adds a builder method
UCommand::timeout
to set a timeout asDuration
which is applied inUChild::wait_with_output
and all dependent methods likeUCommand:run
,UChild::wait
etc. The default timeout inUChild::kill
can also be overwritten that way.With
rstest
comes atimeout
macro which can be used in test functions to complete the needs for setting timeouts in tests.Closes #4226