aboutsummaryrefslogtreecommitdiffstats
path: root/vm/dispatcher/pool_test.go
Commit message (Collapse)AuthorAgeFilesLines
* vm: add context to Pool.Create()Aleksandr Nogikh2025-10-011-7/+7
| | | | | | | | | | Enable external abortion of the instance creation process. This is especially useful for the qemu case where we retry the creation/boot up to 1000 times, which can take significant time (e.g. it timeouts syz-cluster pods on unstable kernels). The context can be further propagated to WaitForSSH, but that requires another quite significant vm/ refactoring.
* vm/dispatcher: don't block on the boot error chan on exitAleksandr Nogikh2025-08-061-0/+33
| | | | | | | React on the context cancellation even if the boot error channel is blocked. Add a test that verifies this behavior. Print a log message if the channel is full.
* vm/dispatcher: make pool.Run cancellableAleksandr Nogikh2025-04-231-6/+55
| | | | | | | | | | Make the pool.Run() function take a context.Context to be able to abort the callback passed to it or abort its scheduling if it's not yet running. Otherwise, if the callback is not yet started and the pool's Loop is aborted, we risk waiting for pool.Run() forever. It prevents the normal shutdown of repro.Run() and, consequently, the DiffFuzzer functionality.
* syz-manager: add pause functionDmitry Vyukov2024-11-081-0/+44
| | | | | | | | | The pause function is useful to make manager stop consuming CPU for some time, e.g. when it runs on a shared machine, and a user wants to use CPU for something else. Previously one would need to kill the manager process and restart later to achieve this, but the restart is costly, and aborts all bug reproductions.
* vm/dispatcher: support updating the default functionAleksandr Nogikh2024-08-131-0/+42
| | | | Stop all default VMs and restart them with the new handler.
* vm/dispatcher: add TestPoolStress()Aleksandr Nogikh2024-08-021-0/+34
| | | | | The test should aid the Go race detector to detect bugs in the dispatcher.Pool code.
* vm/dispatcher: make the test more deterministicAleksandr Nogikh2024-07-221-12/+12
| | | | | | | | | There was a race between starting the job and resetting the reserved VM count. Rewrite the test to let it run regardless of the thread interleaving. Closes #5090.
* vm/dispatcher: introduce a generic instance poolAleksandr Nogikh2024-07-111-0/+171
The pool operates on a low level and assumes that there's one default activity (=fuzzing) that is performed by the VMs and that there are also occasional non-default activities that must be performed by some VMs (=bug reproduction).