-
Notifications
You must be signed in to change notification settings - Fork 116
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
set INTERCEPT_ALL_OBJS in tests when needed #28
Conversation
Reviewed 2 of 2 files at r1. Comments from Reviewable |
With this patch, and the one in pmem/pmdk#2063 (which I'll bring downstream from NVML after being merged there) I managed to successfully execute all tests with clang and ASAN. Ref #7 |
Codecov Report
@@ Coverage Diff @@
## master #28 +/- ##
=======================================
Coverage 56.93% 56.93%
=======================================
Files 18 18
Lines 1486 1486
Branches 413 413
=======================================
Hits 846 846
Misses 440 440
Partials 200 200 Continue to review full report at Codecov.
|
Update: I added another commit, for setting another variable. |
20ec50b
to
6b3fe86
Compare
Reviewed 4 of 4 files at r3. Comments from Reviewable |
test/check_log.cmake
Outdated
execute_process(COMMAND ${TEST_PROG} | ||
${TEST_PROG_ARG} ${LOG_OUTPUT} ${SECOND_LOG_OUTPUT} | ||
RESULT_VARIABLE HAD_ERROR) | ||
unset(ENV{LD_PRELOAD}) | ||
unset(ENV{LD_DEBUG}) |
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.
Is this supposed to be here?
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.
Nope, I just forgot it.
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.
Removed.
test/check_log.cmake
Outdated
execute_process(COMMAND ${TEST_PROG} ${TEST_PROG_ARG} ${LOG_OUTPUT} | ||
RESULT_VARIABLE HAD_ERROR) | ||
unset(ENV{LD_PRELOAD}) | ||
unset(ENV{LD_DEBUG}) |
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.
ditto
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.
Removed.
This allows testing build with the -fsanitize=address flag. The INTERCEPT_ALL_OBJS is not needed during asm_pattern tests, is needed during logging tests (as some log messages might pass through syscall instructions in asan object code outside libc), and are not needed during the prog_* tests - as those tests only look at a specific syscall made in the app anyways.
For preload asan runtime when needed.
Reviewed 3 of 4 files at r3, 1 of 1 files at r4. Comments from Reviewable |
I am good with this. Just a question. Is there a way to do an 'include' in a CMakeLists.txt file? It seems silly to have to continue to repeat the set the same variable over and over. Reviewed 3 of 4 files at r3, 1 of 1 files at r4. Comments from Reviewable |
This allows testing build with the -fsanitize=address flag.
The INTERCEPT_ALL_OBJS is not needed during asm_pattern tests,
is needed during logging tests (as some log messages might pass
through syscall instructions in asan object code outside libc),
and are not needed during the prog_* tests - as those tests
only look at a specific syscall made in the app anyways.
This change is