[fix](test) Fix TestGlob hardcoded ASAN path incompatible with non-ASAN builds#64213
Open
heguanhui wants to merge 1 commit into
Open
[fix](test) Fix TestGlob hardcoded ASAN path incompatible with non-ASAN builds#64213heguanhui wants to merge 1 commit into
heguanhui wants to merge 1 commit into
Conversation
…AN builds
### What problem does this PR solve?
Issue Number: close #xxx
Problem Summary: LocalFileSystemTest.TestGlob hardcodes the path
`./be/ut_build_ASAN/test/file_path/` for creating test files, but
`safe_glob()` looks up files under `config::user_files_secure_path`
(which resolves to `${DORIS_HOME}/test/`). In ASAN mode these paths
happen to coincide, so the test passes. In LSAN or other non-ASAN
builds, ${DORIS_HOME} differs while files are still created under the
hardcoded ASAN path, causing the glob to find nothing and the test to
fail.
Fix by using `getenv("DORIS_HOME")` to construct the test directory
and explicitly setting `config::user_files_secure_path` to match,
with save/restore to avoid polluting other tests.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- Behavior changed: No
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
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.
What problem does this PR solve?
Issue Number: close #64212
Problem Summary:
LocalFileSystemTest.TestGlobhardcodes the path./be/ut_build_ASAN/test/file_path/, which only works when building withCMAKE_BUILD_TYPE=ASAN. On other build types (LSAN, TSAN, UBSAN, etc.), the test directory is./be/ut_build_LSAN/test/file_path/(or similar), causingsafe_globto fail because the files are created in a non-existent path.run-be-ut.shsetsDORIS_HOMEto${CMAKE_BUILD_DIR}/test/at runtime (line 556), which already adapts to each build type. Usegetenv("DORIS_HOME")to construct the path dynamically instead of hardcoding the ASAN-specific path.Release note
None
Check List (For Author)