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 EC0626EC5F; Mon, 19 Apr 2021 16:42:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EC0626EC5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618839741; bh=h2o1FAtI1L58RyqzrAF+LRIkA6OiFeCKi/7dnjFNFeI=; 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=QKW6pdvpsqPWWcVBusXAatwNmGfx7YuUTTpqVJHX4yo479vguGr+plxYeo/qDpbSl 5hMYh7l29MNLwmnJ+23s/woLLejwHewerc5CJoKMu51H/hkLJL7RaDpA+gXXbCgb6f dF02MQ9bmqHfXoCG1mljfQ8YaVydJeX8/SqSZfYE= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 94BFF6EC5F for ; Mon, 19 Apr 2021 16:42:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 94BFF6EC5F Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lYUAM-0001FY-RN; Mon, 19 Apr 2021 16:42:19 +0300 Date: Mon, 19 Apr 2021 16:42:05 +0300 To: Sergey Kaplun Message-ID: <20210419134205.GC29703@tarantool.org> References: <20210416182100.10115-1-skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210416182100.10115-1-skaplun@tarantool.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D0F00AE41BB9A5343182A05F538085040FBDBD6351C2E25AD6766F582DC3CEE94124CB250BFB9DA6F80CF22713C21A9BA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E724D704EAF55A818638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B279B6BC95E37C27F80FE5FF8E8663ED9ECCD65611471A2689D2E47CDBA5A96583C09775C1D3CA48CFED8438A78DFE0A9E117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE74A95F4E53E8DCE969FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7352629B07FD02F83A6C4224003CC83647689D4C264860C145E X-C1DE0DAB: 0D63561A33F958A530F16DC2C483D2EA1754BDF93173D93008CCDBB31000FF97D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346840168BCAD8054EF07C2C75802D3B1F7358B730CC885E62EF056B77D122E23330F06C14095BAF791D7E09C32AA3244CDDB68DC657ED0393FD0515B43A744AEC69B6CAE0477E908DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojocJA+pXcDukaD4LBcEWbpg== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822BBF39B83C15A188547760EBA7D303053A7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit] test: fix directory detection in lua-Harness suite 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, Nice catch, thanks! The bug is awesome, like it! The patch itself LGTM. On 16.04.21, Sergey Kaplun wrote: > <314-regex.t> uses `arg[0]:find'314'` to determine the name of the > directory where rx_* files are located. This leads to the test > failure, when lua-Harness suite run in the directory containing > "314" in its name, because the found path doesn't contain the required > files. > > This patch fixes directory name detection. > > Follows up tarantool/tarantool#5844 > --- > > I tested it locally on branch in directory containing "314" in the name. > Also, I grepped the test suites with "find", "match", "sub" patterns, > but didn't see other places with such bug like that. Great, thanks! I'll report the bug to François later. > > Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-noticket-harness-314-find-bug > Tarantool branch: https://github.com/tarantool/tarantool/tree/skaplun/gh-noticket-harness-314-find-bug > > test/lua-Harness-tests/314-regex.t | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/test/lua-Harness-tests/314-regex.t b/test/lua-Harness-tests/314-regex.t > index ad4554cd..58cdb66e 100755 > --- a/test/lua-Harness-tests/314-regex.t > +++ b/test/lua-Harness-tests/314-regex.t > @@ -164,7 +164,7 @@ local function split (line) > end > > local test_number = 0 > -local dirname = arg[0]:sub(1, arg[0]:find'314' -1) > +local dirname = arg[0]:gsub('([^/]+)%.t$', '') > for _, filename in ipairs(test_files) do > local f, msg = io.open(dirname .. filename, 'r') > if f == nil then > -- > 2.31.0 > -- Best regards, IM