-
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
Fix sds unittest tests to check for zmalloc_usable_size #1314
Conversation
Currently sdsAllocSize does not calculate PREFIX_SIZE when no malloc_size available, this casue test_typesAndAllocSize fail in the new unittest. Signed-off-by: Binbin <[email protected]>
I guess we don't want to modify sdsAllocSize to include it? so i just modify the test. The failure test CI: https://github.com/valkey-io/valkey/actions/runs/11865335400/job/33070348096#step:7:254 |
Signed-off-by: Binbin <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1314 +/- ##
============================================
- Coverage 70.73% 70.67% -0.07%
============================================
Files 115 115
Lines 63158 63158
============================================
- Hits 44674 44636 -38
- Misses 18484 18522 +38 |
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.
I'm okay with this to get the tests passing regardless, I feel like there is probably a better way to expose the API to the testing though.
Signed-off-by: Binbin <[email protected]>
s_malloc_size == zmalloc_size, currently sdsAllocSize does not
calculate PREFIX_SIZE when no malloc_size available, this casue
test_typesAndAllocSize fail in the new unittest, what we want to
check is actually zmalloc_usable_size.