memtarget & memcapacity: tests and fixes - #1374
Merged
lukaszstolarczuk merged 3 commits intoJun 17, 2025
Merged
Conversation
lukaszstolarczuk
force-pushed
the
tests-memtarget
branch
3 times, most recently
from
June 13, 2025 10:39
9f69e06 to
4c22546
Compare
bratpiorka
approved these changes
Jun 13, 2025
Contributor
we have function /// \brief Creates new empty memspace, which can be populated with umfMemspaceMemtargetAdd()
/// \param hMemspace [out] handle to the newly created memspace
/// \return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
///
umf_result_t umfMemspaceNew(umf_memspace_handle_t *hMemspace);|So this sentence is not true. |
in internal memspace and memtarget functions.
previously we got OUT_OF_HOST_MEMORY while removing it. Extend the testing to cover this.
lukaszstolarczuk
force-pushed
the
tests-memtarget
branch
from
June 16, 2025 14:10
4c22546 to
9087e18
Compare
Collaborator
Author
Fair point. Changed. |
lplewa
approved these changes
Jun 17, 2025
lplewa
left a comment
Contributor
There was a problem hiding this comment.
Nit: Add test where you remove all targets from the memspace, and then add some.
Collaborator
Author
I'll add more tests in another iteration, thx |
bratpiorka
approved these changes
Jun 17, 2025
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.
ifs to asserts in internal functions (i.a. to increase the coverage)umfMemspaceMemtargetRemove, when trying to remove the last target - this is aligned with other functions, e.g. when trying to create memspace withsize == 0it throws the same error