-
Notifications
You must be signed in to change notification settings - Fork 35
Skip tests requiring NUMA if NUMA is not supported #655
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
Conversation
examples/memspace/memspace_hmat.c
Outdated
@@ -63,7 +63,7 @@ int main(void) { | |||
// Check if NUMA is available | |||
if (numa_available() < 0) { | |||
fprintf(stderr, "NUMA is not available on this system.\n"); | |||
return -1; | |||
return 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.
please return test_skip_error_code
(see if below)
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; added a define with test_skip_error_code
in examples/common/utils_examples.h
555e5ee
to
857324b
Compare
.gitignore
Outdated
@@ -63,6 +63,7 @@ docs/ | |||
# Build files | |||
/build*/ | |||
out/ | |||
/test/build/ |
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.
??
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 have removed that part
.gitignore
Outdated
@@ -79,6 +80,7 @@ out/ | |||
|
|||
# Temporary files | |||
*.~vsdx | |||
..gitignore.swp |
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.
??
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 going to create a new PR with this line changed to *.swp
examples/CMakeLists.txt
Outdated
@@ -167,6 +167,8 @@ else() | |||
endif() | |||
|
|||
if(LINUX) | |||
set(SKIP_CODE 125) |
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.
UMF_TEST_SKIP_RETURN_CODE
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
examples/common/utils_examples.h
Outdated
|
||
#define test_skip_error_code 125 | ||
|
||
#endif /* UTILS_EXAMPLES_H */ |
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.
add new line at the end of the file.
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/numa_helpers.h
Outdated
@@ -12,6 +12,9 @@ | |||
|
|||
#include "test_helpers.h" | |||
|
|||
// Needed for CI | |||
#define test_skip_error_code 125 |
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.
Better to define it in test_helpers.h
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, however, I am not sure where I have chosen the right location in test_helpers.h
fbb4297
to
92882b0
Compare
92882b0
to
33a00c8
Compare
33a00c8
to
8d883e6
Compare
210357c
to
803fec3
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.
FYI, your commit is veeery descriptive - it's not required to describe, line be line, what you did in the change (we can see that in the commit itself), it's rather useful to describe it high level and provide a reason why. In here it's ok, because you're fixing an issue, so all the details should be there :)
Substitute GTEST_FAIL() with GTEST_SKIP() or add GTEST_SKIP(). Remove UT_ASSERTs checking for NUMA. Enable skipping tests in CMakeLists.txt. Add UMF_TEST_SKIP_RETURN_CODE (=125) to CMakeLists.txt. Add test_skip_error_code (=125) to helper header files for examples and tests. Allow uninstantiated tests in /test/provider_os_memory_multiple_numa_nodes.cpp. Make get_available_numa_nodes() return an empty vector in the environment without NUMA. Fixes: oneapi-src#635 Signed-off-by: Agata Momot <[email protected]>
803fec3
to
80e6459
Compare
Description
Checks with numa_available() whether NUMA is supported on the system, then runs tests requiring NUMA according to the result.
ctest --verbose
instead ofctest --output-on-failure
Fixes #635
Yours first customer ❤️
Checklist