-
Notifications
You must be signed in to change notification settings - Fork 33
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 file_alloc()
of the file memory provider
#800
Fix file_alloc()
of the file memory provider
#800
Conversation
5ec8017
to
3a80ddc
Compare
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.
👍
test/common/test_helpers.cpp
Outdated
@@ -0,0 +1,57 @@ | |||
// Copyright (C) 2023 Intel Corporation |
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.
2024
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.
Done
test/common/test_helpers.cpp
Outdated
@@ -0,0 +1,57 @@ | |||
// Copyright (C) 2023 Intel Corporation | |||
// Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. |
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.
Also we have test_helpers.c and now you are adding test_helpers.cpp with other "c" functions.
First of all, we are writing tests in c++ so we should use c++ features. We should have a base class for all "provider tests" which has this method. Then extend this class with provider specific test classes for given provider.
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.
This change: "We should have a base class for all "provider tests" which has this method. Then extend this class with provider specific test classes for given provider." requires separate pull request IMHO.
The most important part of this PR is the fix for the file provider, because it is unusable at all now and this fix should be merged ASAP IMHO. Refactoring of tests can wait and should be done in a separate PR.
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.
If you insist, I can remove this and add only one simple test instead of this, like here: ldorau@e9282fc
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.
An idea to have common test shared between providers was good. But it was implemented in wrong way. If you do not want to do it clean way, we can do your simple test. anyway we should have even better test for each provider which does multiple allocations and fire in (semi) random way, but it might be a topic for another day.
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.
First I have to provide the very important fix for the file provider - this is the most important thing now.
I added a simple test.
@lplewa Done
3a80ddc
to
b1da922
Compare
Fixes: oneapi-src#796 Signed-off-by: Lukasz Dorau <[email protected]>
Signed-off-by: Lukasz Dorau <[email protected]>
b1da922
to
62444d3
Compare
file_alloc()
of the file memory provider
Code coverage of |
Description
Fix
file_alloc()
of the file memory provider.Fixes: #796
Checklist