From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 56D576EC5D; Tue, 6 Apr 2021 23:02:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 56D576EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617739363; bh=uW4S9/WSq6ocN4WcX5pfWP4acEm0faxcqVC7nv9lKEs=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=t8OPtT7FCL5K6oqMhc9L/eLnlJYH1wqAln/UBHEb/OH+FiF5zzaQoR+7XcwR2Rm6p F0K8OD8LEvyvSttGi0fF6deYtyyfEAhOkPh71Ra4Pz0HI5XDHHMAO6euJisGzzqndU gdjDv2DUettH5v8wOhRE0JXHlz2mzw80bmLTUQ1U= Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 50B616EC5D for ; Tue, 6 Apr 2021 23:02:42 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 50B616EC5D Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1lTruL-0001K7-R5; Tue, 06 Apr 2021 23:02:42 +0300 To: Cyrill Gorcunov Cc: tml References: <20210402123420.885834-1-gorcunov@gmail.com> <20210402123420.885834-4-gorcunov@gmail.com> <5be31f35-b8f4-9800-6804-29957f7634bf@tarantool.org> Message-ID: <1391567c-0cb7-c8f5-d500-21c29cb18746@tarantool.org> Date: Tue, 6 Apr 2021 22:02:40 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD912A3E3D5D4B49FC11CA03434DF6EAA5F4478E741A4EA829900894C459B0CD1B9310801F91B6BC049F07F0C081599005ADD3D62A25EE111B7D599AB4818251001 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745A4951BB4A6F568EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006374C1E21D5B12C874B8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC1F00F067EFCCDC4D6075DFBD67A8A7C27FAF3D02FCC2F1F8389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A3E989B1926288338941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F459A8243F1D1D44CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB86D1867E19FE14079C09775C1D3CA48CF3D321E7403792E342EB15956EA79C166A417C69337E82CC275ECD9A6C639B01B78DA827A17800CE7D283DE70228D6EEC731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A53DB43431C2B23B328984E5494A970B05B9636AAEE7DD04E6D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B71C4B0698719D7C8CADE77E0F7EFCAEDDD929AF19EEB841A72D338551CBE2B57B77432692E1EFB1D7E09C32AA3244CDD445369F4653C7CDF8027A691614E1D05AB220A9D022EBC729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojAX27rRizpLlIgnm5C812JA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A0638225AE95568D014AFDE375325C9F882E1E53841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v20 3/7] box/func: fix modules functions restore X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" >>> diff --git a/test/box/CMakeLists.txt b/test/box/CMakeLists.txt >>> index 06bfbbe9d..944831af2 100644 >>> --- a/test/box/CMakeLists.txt >>> +++ b/test/box/CMakeLists.txt >>> @@ -2,4 +2,6 @@ include_directories(${MSGPUCK_INCLUDE_DIRS}) >>> build_module(function1 function1.c) >>> build_module(reload1 reload1.c) >>> build_module(reload2 reload2.c) >>> +build_module(func_restore1 func_restore1.c) >>> +build_module(func_restore2 func_restore2.c) >>> build_module(tuple_bench tuple_bench.c) >>> diff --git a/test/box/func_restore.result b/test/box/func_restore.result >> >> 5. The test also passes if I just replace rlist_foreach_entry_safe with >> rlist_foreach_entry_safe_reverse in the original code. Which means it >> won't test anything in case we ever change how do we put the functions >> to the list, or how we walk the list on reload. > > The key moment here is not about the list traverse direction: that's > why I use for_each macro instead of the broken cycle we had before. > The order does matter to trigger the issue *without* this patch, > ie to put functions in reverse order and force the recovery > (as is done in my test, I even put a comment there). > > With the new approach using list_for() it is doesn't matter now > how exactly we traverse. If that is what you mean. Nope, that is not what I mean. But I don't know how to say it easier, even in Russian. >> I propose you to make the test harder to bypass. > > The original code restores only one last failed function and > my test is done the way to trigger the issue. I would like to > make it more harder to bypass but I don't see an other way. Well, did you try? The test would fail regardless of the order, if you would try to drop the middle function. Or both the first and the last functions. Or try all the combinations.