add proxy lib tests without LD_PRELOAD#1480
Draft
bratpiorka wants to merge 4 commits intooneapi-src:mainfrom
Draft
add proxy lib tests without LD_PRELOAD#1480bratpiorka wants to merge 4 commits intooneapi-src:mainfrom
bratpiorka wants to merge 4 commits intooneapi-src:mainfrom
Conversation
604b7aa to
dbd9999
Compare
dbd9999 to
96333d2
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds tests that verify the proxy library functionality works correctly without requiring LD_PRELOAD, implementing additional runtime detection mechanisms for the proxy library and cleaning up initialization patterns.
- Adds proxy library detection via dlopen() in addition to LD_PRELOAD environment variable checking
- Simplifies constructor/destructor priorities and consolidates logger initialization to use a single initialization pattern
- Enhances CI testing to validate both proxy library usage scenarios
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/utils/utils_log.cpp | Updates test expectations to reflect renamed logging function |
| src/utils/utils_log.c | Implements single logger initialization pattern with thread-safety |
| src/utils/utils_load_library.c | Adds debug logging for library open/close operations |
| src/utils/utils_common.h | Adds dlopen-based proxy library detection alongside LD_PRELOAD check |
| src/proxy_lib/proxy_lib_linux.c | Removes constructor/destructor priority specifications |
| src/coarse/coarse.c | Simplifies logger initialization by removing platform-specific patterns |
| .github/workflows/reusable_proxy_lib.yml | Adds test run without proxy library to CI workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/utils/utils_common.h
Outdated
| static inline int utils_is_running_in_proxy_lib(void) { | ||
| // check if the proxy library is loaded using dlopen() | ||
| void *proxy_lib_handle = | ||
| utils_open_library("libumf_proxy.so", UMF_UTIL_OPEN_LIBRARY_NO_LOAD); |
There was a problem hiding this comment.
The hardcoded library name "libumf_proxy.so" makes this code platform-specific to Linux. Consider using a platform-specific macro or variable to support different operating systems (e.g., "libumf_proxy.dll" on Windows).
96333d2 to
46e66a2
Compare
46e66a2 to
220aa29
Compare
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.
add proxy lib tests without LD_PRELOAD + needed fixes