On Thu, 27 Jul 2023 at 16:20, Cleber Rosa <cr...@redhat.com> wrote: > > On Tue, Jul 25, 2023 at 1:13 PM Peter Maydell <peter.mayd...@linaro.org> > wrote: > > Why is a "Missing asset" causing a timeout after 90 seconds, > > rather than being accounted as a "SKIP" ("missing requirements > > in the test environment" sounds like what we have here) ? > > > > Hi Peter, > > First of all, I am sorry for the frustration you experienced while > trying to understand all of this. It tooke me a while too. Anyways, > the 90 seconds timeout is set here[1]. > > > I don't understand the debug.log, because it says all of > > * that it retrieved the URL > > That happens here[2], because Python's urllib.request.urlopen()[3] > returned a response. The message is clearly misleading, though, > because: > > 1. the response may not indicate that the request was successful (even > though the most common exception raised by unsuccessful operations, > HTTPError, is being handled) > 2. that the file's content being pointed at by the URL has been transferred. > > I've opened an issue[4] to fix this misleading message. > > > * that it wanted to cancel the test > > Yes, this is the default behavior set here[5] (cancel_on_missing=True). > > > * that the test timed out > > > > My understanding, up to this point, is that: > > Avocado signals to the test that it should be interrupted. The > handling of the exception gets to the attempt to fetch the asset, > which fails and is thus considered missing. Because of > cancel_on_missing=True, It sets the status of the test, up to that > point, to be CANCELed. > > But, Avocado "knows better", because it triggered the interruption of > the test, so it overwrites that status of the test as INTERRUPTed. > The whole thing may be complex and confusing, but IMO it seems > coherent so far (minus the misleading "retrieved" message).
Ah, so the problem is that we are trying to download the asset file, and the remote server is stalling so it doesn't actually download the file in 90s, and Avocado doesn't distinguish "hit the timeout while trying to download assets" from "hit the timeout running the actual test" ? This sounds to me like the ideal would be that there is a separate timeout for file downloads (which could then be a lot shorter than the overall test timeout), and "timeout during asset download" would be detected separately from "timeout while actually running test". But maybe the separation-of-phases in newer Avocado achieves that already ? thanks -- PMM