[Tarantool-patches] [PATCH v2 1/2] fiber: introduce a callback for fibers switch-over

Igor Munkin imun at tarantool.org
Wed Sep 30 12:30:04 MSK 2020


Vlad,

Thanks for your review!

On 30.09.20, Vladislav Shpilevoy wrote:
> Hi! Thanks for the patch!
> 
> > diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
> > index 419477748..aace8cf50 100644
> > --- a/test/unit/CMakeLists.txt
> > +++ b/test/unit/CMakeLists.txt
> > @@ -50,7 +50,7 @@ add_executable(bitset_index.test bitset_index.c)
> >  target_link_libraries(bitset_index.test bitset)
> >  add_executable(base64.test base64.c)
> >  target_link_libraries(base64.test misc unit)
> > -add_executable(uuid.test uuid.c)
> > +add_executable(uuid.test uuid.c core_test_utils.c)
> 
> To make lib/core more self-sufficient we could make cord_on_yield
> inlined in fiber.h under a macros like LIBCORE_USE_DEFAULT_ON_YIELD.
> Which would be set by default to 1, but to 0 in the executable file.

Oh, this is a nice one. It might be a solution but...

> 
> Could help not to change the test binaries, and whatever else depends
> on lib/core, but does not care about Lua.

...unfortunately it's not. At first, we need to build both libraries
with the new define set to 1 and to 0. Furthermore, this leads to link
all tests against "coretest" instead of original "core". However, tests
implicitly dependent on "core" are still linked against it, so the issue
is not solved.

> 
> I do not insist, but I will do that myself if someday I will need to
> write a new unit test (raft, for example).

I would be glad to fix the issue, so let's return to it a bit later.
I hope there is a CMake recipe or hack for this case.

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list