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 CF5F25B18EA; Wed, 4 Oct 2023 13:48:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CF5F25B18EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1696416509; bh=gbpMW6QMOv+gpvz4/5FM15cy5Tdc7nHVxuIqfCcoAO8=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=OGLGAMM6ZbN/8c2UvGHryfAYCEziqcn3hKvQq57y7jn9Os/hKCBcCSrwpsDLKVdP9 tWnDbqERjWnkroUa4FDxprp+EZgXE16du0FiTEMt2Ldv70xZI//27+9hDdphRiPAEr 6kpCjWVQbYxUF9ApJuRVnxX+Gpj4vRq9CrR+59u0= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [95.163.41.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 51EE95B18EA for ; Wed, 4 Oct 2023 13:48:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 51EE95B18EA Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1qnzQZ-009cZ6-1E; Wed, 04 Oct 2023 13:48:27 +0300 Date: Wed, 4 Oct 2023 13:48:27 +0300 To: Sergey Bronnikov Cc: Sergey Bronnikov , max.kokryashkin@gmail.com, tarantool-patches@dev.tarantool.org Message-ID: References: <26636e3dcb8ade3bdc23d9544f9a7e2ffe4322b2.1695711374.git.sergeyb@tarantool.org> <2e683729-401b-1b86-5a60-54a2cd39dc84@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2e683729-401b-1b86-5a60-54a2cd39dc84@tarantool.org> X-Mailru-Src: smtp X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD94A796AF4779ECFCEACF6BA3155450C7D172A2DC375030A1C182A05F53808504097278E6177794B4A3538DF69865FFA6888D666098C8DC5EFE355EADEDB89D71F X-C1DE0DAB: 0D63561A33F958A571A2F20509C17BE66C2BC8D3A22115631A4508520D7C436EF87CCE6106E1FC07E67D4AC08A07B9B0034D30FDF2F620DBCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0AD5177F0B940C8B66ECE892A7B2722663E91682638B966EB3F662256BEEFA9527FA954B302A09E934307DCB0323848D2C6BE541EF389E384046AE4A9C440C2E78975684D4BE44D753737FD76D11AF80A0D614B4A50A17353A620505D91F57B63EAEA455F16B58544A21C197AAF4D2E4732965026E5D17F6739C77C69D99B9914278E50E1F0597A6FD5CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojS50qH6HnxT0ieb8GSq5Htw== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE407897993F897E7152630E87713FEC0D14CCD8872D538E8F8CBD51284F0FE6F529ABC7555A253F5B200DF104D74F62EE79D27EC13EC74F6107F4198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit] LJ_GC64: Fix lua_concat(). 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the fixes! LGTM, except for the single comment below. > > + Info info; > > > + info.value = 7; I am really sorry, that I didn't noticed that in the first round, but the test case can be reduced a bit more. We don't really need the `Info` structure and can use some basic type like `int`, for example. One might argue that such change can reduce the readability a bit, so I leave the final decision up to you. > Sure, added in a separate patch and updated branch force-pushed. > > commit 71f4161115c2e2c13c91e2804f9c41f673ada5ce > Author: Sergey Bronnikov > Date:   Tue Oct 3 17:39:48 2023 +0300 > >     test: introduce asserts assert_str{_not}_equal > >     The patch follows up commit a0483bd214f2 ("test: introduce module for C >     tests") and adds additional asserts suitable for comparing strings. > > diff --git a/test/tarantool-c-tests/README.md > b/test/tarantool-c-tests/README.md > index 462534be..8fad6407 100644 > --- a/test/tarantool-c-tests/README.md > +++ b/test/tarantool-c-tests/README.md > @@ -35,6 +35,8 @@ glibc `assert()`: >    equal to the `b`. >  * `assert_double{_not}_equal(a, b)` -- check that two doubles are {not} >    **exactly** equal. > +* `assert_str{_not}_equal(a, b)` -- check that `char *` variable `a` is > {not} > +  equal to the `b`. > >  ## Directives > > diff --git a/test/tarantool-c-tests/test.h b/test/tarantool-c-tests/test.h > index 8b14c705..bbf573b2 100644 > --- a/test/tarantool-c-tests/test.h > +++ b/test/tarantool-c-tests/test.h > @@ -13,8 +13,6 @@ >   * * Helpers assert macros: >   *   - assert_uint_equal if needed >   *   - assert_uint_not_equal if needed > - *   - assert_str_equal if needed > - *   - assert_str_not_equal if needed >   *   - assert_memory_equal if needed >   *   - assert_memory_not_equal if needed >   * * Pragmas. > @@ -214,4 +212,19 @@ static inline int todo(const char *reason) >      );                                \ >  } while (0) > > +#define assert_str_equal(got, expected, n) do {                \ > +    assert_general(strncmp(got, expected, n) == 0,            \ > +               ASSERT_EQUAL_FMT(int, "%d"),            \ > +               __FILE__, __LINE__, (got), (expected)        \ > +    );                                \ > +} while (0) > + > +#define assert_str_not_equal(got, unexpected, n) do { \ > +    assert_general(strncmp(got, expected, n) != 0,            \ > +               ASSERT_NOT_EQUAL_FMT(int, "%d"),            \ > +               __FILE__, __LINE__, (got), (unexpected)        \ > +    );                                \ > +} while (0) > + > + >  #endif /* TARANTOOL_LUAJIT_TEST_H */ This patch LGTM too. However, please re-send the whole series as `v2` if you'll need to do similar changes next time. Best regards, Maxim Kokryashkin