Open madolson opened 1 month ago
Is there a part of this not WIP currently that I can pick up @madolson ?
@SoulPancake The only one not picked up right now is dict.c.
I have tried porting dict.c
under the new framework, but there is an issue with the test (or new test framework, or even dict.c
itself). Reproduce steps
dict.c
to unit/test_dict.c
include
in test_dict.c
relatively. You will need #include "../dict.c"
as there are some private functions used in the test.test_help.h
and change the print macro, but optionalmake valkey-unit-tests
valkey-unit-tests --single test_dict.c
segmentation fault
on linux (stack overflow) or infinite loop on macos, caused by rehashidx
always being 0I've checked the new test framework but nothing could cause this inconsistency with original unit tests.
The legacy unit tests were a collection of distinct tests stored at the bottom of various files, that required rebuilding the server with a special flag and starting the server. We're moving to a new framework that can always be built and are running on a unified infrastructure. This issue is keeping track of migration from the old to new framework.
To migrate the tests, remove the custom testing code in the testing file lists listed below, create a new test like src/unit/test_*.c, and remove the reference in https://github.com/valkey-io/valkey/blob/5b1fd222ed97430dfeef27a95aeb7e1fb8fd1352/src/server.c#L6890. See the README for more information about writing a new unit test.