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 E62996F87A; Fri, 16 Apr 2021 21:22:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E62996F87A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1618597325; bh=USXoJlgbpBWlxfUbrSJluDpgoTUDsNOL1YOo1FxwyGM=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=JEE9SP0A2fZsdoMtjUJhIGPw1zkI+yU1yYbv0MtcOuH3koMoPVuk1Gp9z0DP8Jwf7 orOCzDF9zx00XZaymQoXoa9sqlbBtbMQo9nk+QnRMQPCW5Q6bou8L31UmHj2XdTJDU aChuCF2Mb4nh56R9z2ADvXKRTAKbYoIkVZGGCWfk= Received: from smtp17.mail.ru (smtp17.mail.ru [94.100.176.154]) (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 2E3B06F87A for ; Fri, 16 Apr 2021 21:22:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2E3B06F87A Received: by smtp17.mail.ru with esmtpa (envelope-from ) id 1lXT6R-0002y6-5X; Fri, 16 Apr 2021 21:22:03 +0300 To: Igor Munkin , Sergey Ostanevich Date: Fri, 16 Apr 2021 21:21:00 +0300 Message-Id: <20210416182100.10115-1-skaplun@tarantool.org> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92FFCB8E6708E7480257C85EA0BB7A95D5E28B957962BB550182A05F5380850406DC3C82470BE29841199A266FF06C006A6AA345CC48114E8F2595BFEFE36BD62 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7811C3E343B302E2EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371750936FC250F8708638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B2A28EF46839E4E65E113E78B2453C4EFB44A6ACC89FD899E7D2E47CDBA5A96583C09775C1D3CA48CF7EF884183F8E4D67117882F4460429724CE54428C33FAD30A8DF7F3B2552694AC26CFBAC0749D213D2E47CDBA5A9658378DA827A17800CE7A6779F98BF527B7A9FA2833FD35BB23DF004C906525384302BEBFE083D3B9BA73A03B725D353964B0B7D0EA88DDEDAC722CA9DD8327EE4930A3850AC1BE2E7356C9A9530EBF72002C4224003CC83647689D4C264860C145E X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2AD77751E876CB595E8F7B195E1C97831951868AC96357874B24383D33A8A987E X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CBF1196BB3248DD4BB558314231B99A1ACE15FF33660EB57B9C2B6934AE262D3EE7EAB7254005DCED03B6C0C05590F8741E0A4E2319210D9B64D260DF9561598F01A9E91200F654B0279E343DB675BB2F8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F507C2EA0814E4502232A10C60BDC224CE32FA67DD605CD8E7AD2DA5B6249332B95CB1AF983481C51D7E09C32AA3244CDE4C7CA4EE4B9631271C98BE250C7A5E30452B15D76AEC14927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj3S6P1v0GIqTyISlAf8MqUg== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4BCBFFCB6998AC0C565440C27D2AFA0DF73D8793387E7E633F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: [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: 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" <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. 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