New issue
Advanced search Search tips

Issue 856386 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Participants' hotlists:
Hotlist-Tast


Sign in to add a comment

Consider doing more to kill Tast tests that ignore their deadlines

Project Member Reported by derat@chromium.org, Jun 25 2018

Issue description

Quoting myself from  issue 853406 :

"The deeper problem (which I'm aware of; see the TODO above) is that I don't have a good way to kill tests that ignore their deadlines right now. Tests run in goroutines, and there's no way to kill a goroutine. This is probably mostly harmless in this case, but it could be bad if a test continued running and did things that stepped on later tests' toes.

The big hammer would be for the test bundle to fork-exec itself to run each test. It can be sure that a test is dead if it does this, but it'll result in additional overhead -- each remote test will need to reestablish the SSH connection, for instance. That might not be a huge deal.

It *is* possible to exit at any point in a goroutine by calling runtime.Goexit() (https://golang.org/pkg/runtime/#Goexit) -- this is what testing.State.Fatal() does, for example. It might be reasonable for State.Context() (and functions in other test support packages?) to make the test abort if it continues using its context after it's hit its deadline.

...

Running each test in its own process is still on the table, but I'd rather not focus on the hostile-test use case -- if we end up with lots of runaway tests, we probably need to be more careful in how we write tests. :-)"
 

Sign in to add a comment