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 72C9970358; Wed, 15 Sep 2021 18:30:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 72C9970358 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631719852; bh=gh4aTmRGGAat0p5sHGMfbwSQIRirYX+qvCviJmIRobo=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OJjPEebczKy/BxKzpYPv/tm0mrQjbHblORUCNalauEhddMkiQ8D2Mozp+yfCntSiz UXHEceePhqxwo6J4VlNwaAMgl8hRiZqYJohPvO98TUgN0Ofj5In1B9b8tehMDDIbtn tho/D+bdadniPzuQgp+pdkGDi5u0ismufptA1Qj4= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 B34B070358 for ; Wed, 15 Sep 2021 18:30:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B34B070358 Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1mQWs5-0005Tc-Of; Wed, 15 Sep 2021 18:30:50 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) In-Reply-To: <0d207e1a15360109e1e9c4bb775248f0fc04edc6.1631170629.git.skaplun@tarantool.org> Date: Wed, 15 Sep 2021 18:30:48 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <0d207e1a15360109e1e9c4bb775248f0fc04edc6.1631170629.git.skaplun@tarantool.org> To: Sergey Kaplun X-Mailer: Apple Mail (2.3654.120.0.1.13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91AE02D33A9C88A2F250B8A21226859B08342E9AB5F4ECC3300894C459B0CD1B954ABEE819328C73129744728E9C2D6CBCF4949AA5CD6839200F5F90D052F6071 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE73F300A97FDD4E158EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372D850D7477D401F58638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D857372615F558FB61186C0FD2BCC190AF117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18CB629EEF1311BF91D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6BDB3AEF73D8456A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A58D36903EB66F2E03C74A6ED13383130DFC4263D81ED7A340D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7502E6951B79FF9A3F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34951738D4D62E58A41385D7CF2AFF8229D3293E1FF04454AF664FEE7BCF212E09FB54C9F1A8EEE2881D7E09C32AA3244CFD510D5704A1F81BA3AD2585BDA3BDC51DD47778AE04E04DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojmwY/hTp72s8oLGpN8wrTxg== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E74844DF9CD1EF62D5A96485208DD78B2ECE7DDE4CAEB0BD9AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] test: fix path storage for non-concatable objects 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: sergos via Tarantool-patches Reply-To: sergos Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! > On 9 Sep 2021, at 10:03, Sergey Kaplun wrote: >=20 > When the key of a table to compare via `tap.test:is_deeply()` is > non-concatable object (i.e. lightuserdata) concatenation with path ^^^^ does it mean the object has no __concat, while has __tostring? As a result: is there a case an object has no __tostring? > raises an error. >=20 > This patch converts object to string to avoid this error. >=20 > Needed for tarantool/tarantool#5629 > --- > test/tarantool-tests/tap.lua | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/test/tarantool-tests/tap.lua = b/test/tarantool-tests/tap.lua > index 44fcac3d..a1f54d20 100644 > --- a/test/tarantool-tests/tap.lua > +++ b/test/tarantool-tests/tap.lua > @@ -166,7 +166,7 @@ local function is_deeply(test, got, expected, = message, extra) >=20 > for k, v in pairs(got) do > has[k] =3D true > - extra.path =3D path .. "." .. k > + extra.path =3D path .. "." .. tostring(k) > if not cmpdeeply(v, expected[k], extra) then > return false > end > @@ -175,7 +175,7 @@ local function is_deeply(test, got, expected, = message, extra) > -- Check if expected contains more keys then got. > for k, v in pairs(expected) do > if has[k] ~=3D true and (extra.strict or v ~=3D NULL) then > - extra.path =3D path .. "." .. k > + extra.path =3D path .. "." .. tostring(k) > extra.expected =3D "key (exists): " .. tostring(k) > extra.got =3D "key (missing): " .. tostring(k) > return false > --=20 > 2.31.0 >=20