-
Notifications
You must be signed in to change notification settings - Fork 653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate zmalloc.c unit tests to new test framework #459
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #459 +/- ##
============================================
+ Coverage 68.95% 69.80% +0.84%
============================================
Files 109 109
Lines 61793 61801 +8
============================================
+ Hits 42611 43138 +527
+ Misses 19182 18663 -519
|
Same as this #458 (comment), I didn't remove legacy zmalloc_test due to the conflict. And, I will raise a follow-up PR to remove them together. @madolson In the meantime, could you please review and merge this PR, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly lgtm.
Signed-off-by: Karthick Ariyaratnam <[email protected]>
Despite the fact that SO_REUSEADDR can be set on a Unix domain socket via setsockopt() without reporting an error, SO_REUSEADDR was actually created for ipv4/ipv6 and it's not supported for sockets of AF_UNIX. Therefore, setting this option on a Unix domain socket does nothing but costs one extra system call. Signed-off-by: Andy Pan <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Signed-off-by: Karthick Ariyaratnam <[email protected]>
Signed-off-by: Karthick Ariyaratnam <[email protected]>
This PR migrates all tests related to util into new test framework as part of the parent issue valkey-io#428. --------- Signed-off-by: Karthick Ariyaratnam <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Updated redis instances accordingly as follows. rediscmd -> serverCmd freeRedisModuleAsyncRMCallPromise -> freeValkeyModuleAsyncRMCallPromise MyCommand_RedisCommand -> MyCommand_ValkeyCommand RedisModuleString -> ValkeyModuleString flushRedisModuleIOBuffer -> flushValkeyModuleIOBuffer Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
This PR migrates all tests related to kvstore into new test framework as part of the parent issue valkey-io#428. --------- Signed-off-by: Karthick Ariyaratnam <[email protected]> Signed-off-by: Madelyn Olson <[email protected]> Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Updated valkey in follwing functions. genRedisInfoString -> genValkeyInfoString genRedisInfoStringCommandStats -> genValkeyInfoStringCommandStats genRedisInfoStringACLStats -> genValkeyInfoStringACLStats genRedisInfoStringLatencyStats -> genValkeyInfoStringLatencyStats Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Fix the compile error with the following command: `make all-with-unit-tests SERVER_CFLAGS='-Werror -DSERVER_TEST' ` ``` /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1172: undefined reference to `lua_next' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1154: undefined reference to `lua_toboolean' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1175: undefined reference to `lua_type' /usr/bin/ld: /home/ubuntu/valkey-shiv-repo/valkey/src/eval.c:1176: undefined reference to `lua_tonumber' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:469: valkey-unit-tests] Error 1 make[1]: Leaving directory '/home/ubuntu/valkey-shiv-repo/valkey/src' make: *** [Makefile:6: all-with-unit-tests] Error 2 ``` Issue is happened as all deps libraries not linked for valkey-unit-tests, so linked all libraries to the binary. Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
This is a preparation for adding clang-format. These comments prevent automatic formatting in some places. With these exceptions, we will be able to run clang-format on the rest of the code. This is a preparation for valkey-io#323. --------- Signed-off-by: Viktor Söderqvist <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
…fig. (valkey-io#415) Updated serverPanic output in db.c based on the extended-redis-compatibility config. and also updated comments in other files. --------- Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
All the intset unit tests are migrated to new test framework as part of valkey-io#344, but the old framework declaration is missed to remove from intset.h. So removed the code. Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
We currently has two disjoint TCL frameworks: 1. Normal testing framework, which trigger by runtest, which individually launches nodes for testing. 2. Cluster framework, which trigger by runtest-cluster, which pre-allocates N nodes and uses them for testing large configurations. The normal TCL testing framework is much more readily tested and is also automatically run as part of the CI for new PRs. The runtest-cluster since it runs very slowly (cannot be parallelized), it currently only runs in daily CI, this results in some changes to the cluster not being exposed in PR CI in time. This PR migrate the Cluster mode tests to normal framework. Some cluster tests are kept in runtest-cluster because of timing issues or not yet supported, we can process them later. Signed-off-by: Binbin <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Signed-off-by: Karthick Ariyaratnam <[email protected]>
This is a follow-up PR to address UNUSED repetition issue (see valkey-io#446 (comment)) in different test source files. Signed-off-by: Karthick Ariyaratnam <[email protected]>
* `freeClientArgv` was previously defined in `server.h` * remove the redundant return Signed-off-by: arthur.lee <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Move dependency from `slowlog.c` into `slowlog.h`, make sure the language server can work properly under `slowlog.h` Signed-off-by: arthur.lee <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
This patch migrates all tests in sds.c into new test framework as part of the parent issue valkey-io#428. --------- Signed-off-by: Lipeng Zhu <[email protected]> Signed-off-by: Madelyn Olson <[email protected]> Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Before this PR, `pipe2()` is only enabled on Linux and FreeBSD while `pipe2()` is available on *BSD. This PR enables `pipe2()` for the rest of *BSD: DragonFlyBSD, NetBSD and OpenBSD. ## References - [pipe2 on DraonFlyBSD](https://man.dragonflybsd.org/?command=pipe§ion=2) - [__DragonFly_version for pipe2](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/7485684fa5c3fadb6c7a1da0d8bb6ea5da4e0f2f/sys/sys/param.h#L121) - [pipe2 on NetBSD](https://man.netbsd.org/pipe.2) - [pipe2 on OpenBSD](https://man.openbsd.org/pipe.2) Signed-off-by: Andy Pan <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
…t slot away with allow-replica-migration enabled (valkey-io#466) Signed-off-by: Karthick Ariyaratnam <[email protected]>
This migrates unit tests related to sha1 to new framework, ref: valkey-io#428. --------- Signed-off-by: Shivshankar-Reddy <[email protected]> Signed-off-by: Madelyn Olson <[email protected]> Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]> Signed-off-by: Karthick Ariyaratnam <[email protected]>
Signed-off-by: Karthick Ariyaratnam <[email protected]>
Please refer the PR #493. |
This PR migrates all tests related to zmalloc into new test framework as part of the parent issue #428.