heguanhui opened a new issue, #64212:
URL: https://github.com/apache/doris/issues/64212
### Description
`LocalFileSystemTest.TestGlob` hardcodes the path
`./be/ut_build_ASAN/test/file_path/`, which only works when building with
`CMAKE_BUILD_TYPE=ASAN`. On other build types (LSAN, TSAN, UBSAN, etc.), the
test directory is `./be/ut_build_LSAN/test/file_path/` (or similar), causing
`safe_glob` to fail because the files are created in a non-existent path.
### Error output
```
[ RUN ] LocalFileSystemTest.TestGlob
../test/io/fs/local_file_system_test.cpp:435: Failure
Value of: io::global_local_filesystem()->safe_glob("./file_path/1/*.txt",
&files).ok()
Actual: false
Expected: true
../test/io/fs/local_file_system_test.cpp:436: Failure
Expected equality of these values:
2
files.size()
Which is: 0
../test/io/fs/local_file_system_test.cpp:438: Failure
Value of: io::global_local_filesystem()->safe_glob("./file_path/*/*.txt",
&files).ok()
Actual: false
Expected: true
../test/io/fs/local_file_system_test.cpp:439: Failure
Expected equality of these values:
2
files.size()
Which is: 0
[ FAILED ] LocalFileSystemTest.TestGlob (120 ms)
```
### Root cause
The test hardcodes `./be/ut_build_ASAN/test/file_path/` as the base path.
`run-be-ut.sh` constructs the build directory as
`${DORIS_HOME}/be/ut_build_${CMAKE_BUILD_TYPE}`, so the path varies by build
type. On LSAN builds, the actual path is `./be/ut_build_LSAN/test/file_path/`,
and the hardcoded ASAN path doesn't exist.
### How to reproduce
Run BE unit tests with a non-ASAN build type, e.g.:
```bash
BUILD_TYPE_UT=LSAN ./run-be-ut.sh --run
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]