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 4D838548FF5; Wed, 26 Jul 2023 13:47:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4D838548FF5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1690368465; bh=z2Wyxtlfrc7TXwzRH077TMYHZkPQBjV9UYVk8qj3xp4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jlv2yL668ekAvLn/gf3TbG3C2lwKIYHJjxkiQXmMGRdU9mfEyfdfcM1WUESFB6qea 7nqZAQCWH1gJX5NZU7CYphKoXnW7mG5FdrUyyDJI7LgVdlLlnUs132iJv9AUcE0FVl w+zUHxMLd2XHEu/FgSV+01/etq6QB5+b2N7wfCQ4= Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [95.163.41.85]) (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 C5431548FF5 for ; Wed, 26 Jul 2023 13:47:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C5431548FF5 Received: by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1qOc3T-00CCKK-1W; Wed, 26 Jul 2023 13:47:43 +0300 Date: Wed, 26 Jul 2023 13:43:16 +0300 To: Igor Munkin Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9262A61978FA9877606B8C81B99FA656A412859FB6553D32E182A05F5380850404C228DA9ACA6FE277D637175856B92EE04DD8EADE24407B7591E04B07F2D456FF71EECC5E7AEA730 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78E8764B5BC580342EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637593B4F2A76947A308638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8C1D8FCFB1C886FFD6034E7FCA3AC4926117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B59F0E22272DBA2DBA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FC42D492BDE3C795E73AA81AA40904B5D9CF19DD082D7633A0C84D3B47A649675F3AA81AA40904B5D98AA50765F79006378BD6BC68178B1FFFD81D268191BDAD3D3666184CF4C3C14F3FC91FA280E0CE3D1A620F70A64A45A98AA50765F790063767794E97B4A1565222CA9DD8327EE4930A3850AC1BE2E735D2457FAF19517CF2C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A52D2E3970FAFB53300D1464A891C75843C21289126A9F8A8DF87CCE6106E1FC07E67D4AC08A07B9B06A1CB4668A9CA5FACB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D34728AF701C68E45397D3497BD4613BCC0354EFD17F8DDBDF8DC4343E17E4208637D38091E893E87BA1D7E09C32AA3244C4F3CE9001CAE39F656DEABD81B7A8378E646F07CC2D4F3D885A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojXeYlEwgoYE+JllgAismkRQ== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769317FB4F905F622D104DD8EADE24407B7EFC4EB6826DC2248DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit v2 3/5] test: introduce test:done TAP helper 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Igor! Thanks for the patch! LGTM, except a minor nits regarding the commit message. On 21.07.23, Igor Munkin wrote: > Before the patch all tests (except ) Typo: s/Before the patch/Before the patch,/ > in tarantool-tests suite terminate their execution via with > the status depending on the test results. However, the second argument > of was omitted and Lua universe was not properly finalized as Typo: s/omitted and/omitted, and/ > a result. This behaviour becomes a problem, when LuaJIT is build with Typo: s/build/built/ > LUAJIT_USE_SYSMALLOC option and AddressSanitizer support enabled, since > the sanitizer starts reporting false positive errors about the memory > allocations without the corresponding memory releases. To resolve these > errors, the second parameter to each call terminating the test > has to be added. > > To avoid loss of the aforementioned parameter in future, Typo: s/in future/in the future/ > helper has been added to the TAP module. Depending on the single > parameter, the new helper either properly finalize the test being run, > or simply checks all the test assertions and raises an error if any of > them fail. The latter case is added especially to handle the specifics > of and still check that everything > works fine. > > Needed for tarantool/tarantool#5878 > > Signed-off-by: Igor Munkin > --- > +local function done(test, exit) > + if exit then > + -- XXX: The second argument is required to properly close Lua > + -- universe (i.e. invoke before exiting). > + -- XXX: return is added explicitly to force CALLT emitting. Side note: Is there a place, where it is important? > + return os.exit(test:check() and 0 or 1, true) > + else > + assert(test:check(), 'Test check failed') > + end > +end > -- > 2.30.2 > -- Best regards, Sergey Kaplun