-
Notifications
You must be signed in to change notification settings - Fork 35
[WIP] Add IPC tests (umfIpcTest
) to the devdax provider
#839
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
[WIP] Add IPC tests (umfIpcTest
) to the devdax provider
#839
Conversation
size_t offset; // offset in the file used for memory mapping | ||
utils_mutex_t lock; // lock of ptr and offset | ||
unsigned protection; // combination of OS-specific protection flags | ||
bool ipc_consumer_only_mode; // when path==NULL and size==0 |
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 am not sure that we do need explicit ipc_consumer_only_mode
flag. Alternatively we can allow path to be empty in that case allocations would not be possible.
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.
But path
is not passed to all API ops.
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.
But
path
is not passed to all API ops.
Wait, it is.
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.
So, do you suggest to always check if (path == NULL)
? I think checking ipc_consumer_only_mode
is more clear.
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.
BTW. please review #831 instead of this one
28ca1f4
to
d8f5695
Compare
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Add utils_align_ptr_down_size_up() to align a pointer down and a size up (for mmap()/munmap()). Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
ea33501
to
fdb5f29
Compare
umfIpcTest
) to the devdax provider
fdb5f29
to
ebd8053
Compare
ebd8053
to
96dea9f
Compare
devdax_open_ipc_handle() has to use the path of the remote /dev/dax got from the IPC handle, not the local one. devdax_open_ipc_handle() has to use also the memory protection got from the IPC handle, so let's add the memory protection to the IPC handle. devdax_open_ipc_handle() should mmap only the required range of memory, not the whole /dev/dax device, so let's add the length of the allocation to the IPC handle. devdax_close_ipc_handle() should unmap only the required range of memory, not the whole /dev/dax device. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Some memory providers (currently the devdax and the file providers) do not support the free() operation (free() always returns the UMF_RESULT_ERROR_NOT_SUPPORTED error). Add the UMF_TEST_PROVIDER_FREE_NOT_SUPPORTED define and the get_umf_result_of_free macro() to ipcFixtures.hpp to enable running umfIpcTest tests when free() is not supported. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
96dea9f
to
4e0e3aa
Compare
Replaced with #845 |
Description
Add IPC tests (
umfIpcTest
) to the devdax provider.Checklist