-
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 ziplist.c unit tests to new framework #486
Conversation
Looks like I may also need to add a test that does pop() and another for createIntList(), since I did not add that back. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #486 +/- ##
============================================
- Coverage 69.77% 69.67% -0.11%
============================================
Files 109 109
Lines 61801 61801
============================================
- Hits 43120 43057 -63
- Misses 18681 18744 +63
|
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.
Looks pretty good, thanks for contributing!
Yikes, I'm not sure how to fix this signing issue. I tried the rebasing instructions, but the result did not look right... |
The best way is probably to do a |
280d67d
to
8d22ff9
Compare
Signed-off-by: Mason Hall <[email protected]>
8d22ff9
to
95341df
Compare
Signed-off-by: Mason Hall <[email protected]>
Signed-off-by: Mason Hall <[email protected]>
Signed-off-by: Mason Hall <[email protected]>
Signed-off-by: Mason Hall <[email protected]>
Signed-off-by: Mason Hall <[email protected]>
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.
LGTM. Ran some more tests, but it looks like it was hitting the issue that we fixed with zmalloc, so seems okay to follow up on that in mainline if it causes an issue.
All the updates LGTM feel free to update them further if you like. |
zl = ziplistDeleteRange(zl, 0, 1); | ||
|
||
TEST_ASSERT(ziplistCompare(p, (unsigned char *)"foo", 3)); |
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 believe p is getting invalidated here because of the ziplistDeleteRange. I think you need to reinitialize it.
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.
Looks like Ping may have beat me to it with #537. Sorry about that.
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.
No worries I tried to run the daily tests before merging it, and there was another known issue so I merged it anyways. :/
Issue #428.
Moved the SERVER_TEST block from ziplist.c into unit tests in test_ziplist.c. I left the benchmark related tasks alone in their own test, as I am not sure what to do with them.
Some of my assertions are a little vague/useless, but I will try to refine them.