From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 770F6302E2 for ; Sat, 8 Jun 2019 10:32:47 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sOvjT2bC2tap for ; Sat, 8 Jun 2019 10:32:47 -0400 (EDT) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3663C2FBDF for ; Sat, 8 Jun 2019 10:32:47 -0400 (EDT) Date: Sat, 8 Jun 2019 17:32:40 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v2 1/5] test: create isolated ev_loop for swim unit tests Message-ID: <20190608143240.GM31327@atlas> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org * Vladislav Shpilevoy [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