From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7272443D679 for ; Fri, 25 Oct 2019 18:15:06 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) From: Serge Petrenko In-Reply-To: <559a4e59-1a36-7b74-e3b8-81d1e5876915@tarantool.org> Date: Fri, 25 Oct 2019 18:15:05 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <52e7822bbcd802528d448c15ce9e9fbe4479c73a.1570546695.git.sergepetrenko@tarantool.org> <559a4e59-1a36-7b74-e3b8-81d1e5876915@tarantool.org> Subject: Re: [Tarantool-patches] [tarantool-patches] [PATCH v2 1/2] test: modify swim_run_test to break event loop List-Id: Tarantool development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org, tarantool-patches@dev.tarantool.org Hi! Thank you for the explanation. I threw this patch away > 23 =D0=BE=D0=BA=D1=82. 2019 =D0=B3., =D0=B2 0:20, Vladislav Shpilevoy = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0= =B0): >=20 > Hi! Thanks for the patch! >=20 > On 08/10/2019 17:03, Serge Petrenko wrote: >> Add a wrapper function around swim test passed to swim_run_test which >> breaks from default cord event loop. Otherwise we will hang = indefinitely >> in ev_run in case there is a started watcher. >=20 > But why? The loop runs only until there are fibers to run. > By design of these tests, after they are done, there should > be not a single fiber nor a watcher, and the loop is finished > without a break. >=20 > This is why the tests pass without this patch. So what is > a purpose of this commit? It does not change anything except > that it may mask some errors. Because if the SWIM unit tests > would hang without a break, then something is wrong. I caught > several bugs in SWIM via this. >=20 > If fiber.top() somehow interferes, then probably you could > turn it off for this test? I just don't want to miss possible > SWIM bugs. >=20 >>=20 >> Found during work on #2694 >> --- >> test/unit/swim_test_utils.c | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >>=20 >=20 -- Serge Petrenko sergepetrenko@tarantool.org