[tarantool-patches] Re: [PATCH v2 1/5] test: create isolated ev_loop for swim unit tests

Konstantin Osipov kostja at tarantool.org
Sat Jun 8 17:32:40 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/06/08 17:11]:
> The SWIM unit tests code with the fake events and time does lots
> of forbidden things: it manually invokes pending watcher
> callbacks; manages global time without a kernel; puts not
> existing descriptors into the loop. These foul blows open the
> gates to the full control over IO events, descriptors, virtual
> time. Hundreds of virtual seconds pass in milliseconds in
> reality, it makes SWIM unit tests fast despite complex logic.
> 
> All these actions does not affect the loop until yield. On yield
> a scheduler fiber wakes up and
> 
>     1) infinitely generates EV_READ on not existing descriptors
>        because a kernel considers them closed;
> 
>     2) manual pending callbacks invocation asserts, because it is
>        not allowed for non-scheduler fibers.
> 
> To avoid these problems a new isolated loop is created, not
> visible for the scheduler. Here the fake events library can rack
> and ruin whatever it wants.
> 
> Needed for #4250

OK to push.


-- 
Konstantin Osipov, Moscow, Russia




More information about the Tarantool-patches mailing list