On 1/21/22 16:18, Emanuele Giuseppe Esposito wrote:


Better to use aio_co_schedule here, too, and move it under the previous WITH_JOB_LOCK_GUARD.

Unfortunately this does not work straightforward: aio_co_enter invokes aio_co_schedule only if the context is different from the main loop, otherwise it can directly enter the coroutine with qemu_aio_coroutine_enter. So always replacing it with aio_co_schedule breaks the unit tests assumptions, as they expect that when control is returned the job has already executed.

A possible solution is to aio_poll() on the condition we want to assert, waiting for the bh to be scheduled. But I don't know if this is then useful to test something.

I think you sorted that out, based on IRC conversation?

Paolo

Reply via email to