Fix memory usage check in test for embedded objects#1675
Merged
zuiderkwast merged 1 commit intoFeb 6, 2025
Merged
Conversation
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1675 +/- ##
=========================================
Coverage 71.05% 71.05%
=========================================
Files 121 121
Lines 65243 65243
=========================================
+ Hits 46357 46360 +3
+ Misses 18886 18883 -3 |
madolson
approved these changes
Feb 6, 2025
xbasel
pushed a commit
to xbasel/valkey
that referenced
this pull request
Mar 27, 2025
Fixes the following test case which fails in builds with allocators that
don't have usable size:
```
*** [err]: Memory usage of embedded string value in tests/unit/type/string.tcl
Expected '40' to be less than or equal to '32' (context: type eval line 5 cmd {assert_lessthan_equal [r memory usage quux] 32} proc ::test)
```
With allocators like libc malloc that doesn't have usable size, zmalloc
stores an extra size field in the allocation. This makes the memory
usage 8 bytes larger than we expected in this test case. We can just
skip this check. It's not the main thing tested in this test case.
The failure was introduced in valkey-io#1613.
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
xbasel
pushed a commit
to xbasel/valkey
that referenced
this pull request
Mar 27, 2025
Fixes the following test case which fails in builds with allocators that
don't have usable size:
```
*** [err]: Memory usage of embedded string value in tests/unit/type/string.tcl
Expected '40' to be less than or equal to '32' (context: type eval line 5 cmd {assert_lessthan_equal [r memory usage quux] 32} proc ::test)
```
With allocators like libc malloc that doesn't have usable size, zmalloc
stores an extra size field in the allocation. This makes the memory
usage 8 bytes larger than we expected in this test case. We can just
skip this check. It's not the main thing tested in this test case.
The failure was introduced in valkey-io#1613.
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
murphyjacob4
pushed a commit
to enjoy-binbin/valkey
that referenced
this pull request
Apr 13, 2025
Fixes the following test case which fails in builds with allocators that
don't have usable size:
```
*** [err]: Memory usage of embedded string value in tests/unit/type/string.tcl
Expected '40' to be less than or equal to '32' (context: type eval line 5 cmd {assert_lessthan_equal [r memory usage quux] 32} proc ::test)
```
With allocators like libc malloc that doesn't have usable size, zmalloc
stores an extra size field in the allocation. This makes the memory
usage 8 bytes larger than we expected in this test case. We can just
skip this check. It's not the main thing tested in this test case.
The failure was introduced in valkey-io#1613.
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the following test case which fails in builds with allocators that don't have usable size:
With allocators like libc malloc that doesn't have usable size, zmalloc stores an extra size field in the allocation. This makes the memory usage 8 bytes larger than we expected in this test case. We can just skip this check. It's not the main thing tested in this test case.
The failure was introduced in #1613.