[Tarantool-patches] [PATCH 1/2] test: force enable assert checks in release build
Igor Munkin
imun at tarantool.org
Wed Oct 14 22:29:35 MSK 2020
Sergey,
Thanks for the patch! Consider a couple nits below.
On 14.10.20, Sergey Kaplun wrote:
> This patch fixes the regression introduced in scope of
> 5a61e1ab54b5c66bfebd836db1ac47996611e065 ('misc: add C and Lua API for
> platform metrics'). As a result of the patch release build
> was failed according to -Werror compiler flag and unused variables that
> used only for assertions checks.
>
> Force #undef NDEBUG directive leaves asserts on and allows not disable
Minor: IMHO "leaves asserts enabled, so the introduced tests works even
with release build" is a little better, but this doesn't change the
meaning, so feel free to ignore.
> newly added tests for release build.
>
> Follows up tarantool/tarantool#5187
> ---
> test/misclib-getmetrics-capi/testgetmetrics.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/test/misclib-getmetrics-capi/testgetmetrics.c b/test/misclib-getmetrics-capi/testgetmetrics.c
> index 8844b17..3b6f599 100644
> --- a/test/misclib-getmetrics-capi/testgetmetrics.c
> +++ b/test/misclib-getmetrics-capi/testgetmetrics.c
> @@ -4,6 +4,7 @@
>
> #include <lmisclib.h>
>
> +#undef NDEBUG
Minor: It would be nice to drop a few words regarding this hack. At the
same time, the code is well-structured, so it's quite obvious that you
want asserts to be always enabled. Feel free to ignore.
> #include <assert.h>
>
> static int base(lua_State *L)
> --
> 2.28.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list