diff --git a/be/test/runtime/user_function_cache_test.cpp b/be/test/runtime/user_function_cache_test.cpp index 970ffe786c..201e8cbc2e 100644 --- a/be/test/runtime/user_function_cache_test.cpp +++ b/be/test/runtime/user_function_cache_test.cpp @@ -96,7 +96,7 @@ public: hostname = "http://127.0.0.1:" + std::to_string(real_port); // compile code to so - system("g++ -shared ./be/test/runtime/test_data/user_function_cache/lib/my_add.cc -o " + system("g++ -shared -fPIC ./be/test/runtime/test_data/user_function_cache/lib/my_add.cc -o " "./be/test/runtime/test_data/user_function_cache/lib/my_add.so"); my_add_md5sum = diff --git a/be/test/util/filesystem_util_test.cpp b/be/test/util/filesystem_util_test.cpp index f445d443f0..acafebc9a1 100644 --- a/be/test/util/filesystem_util_test.cpp +++ b/be/test/util/filesystem_util_test.cpp @@ -35,8 +35,9 @@ TEST(FileSystemUtil, rlimit) { } TEST(FileSystemUtil, CreateDirectory) { + char filename[] = "temp-XXXXXX"; // Setup a temporary directory with one subdir - std::string dir_name = std::tmpnam(nullptr); + std::string dir_name = mkdtemp(filename); path dir{dir_name}; path subdir1 = dir / "path1"; path subdir2 = dir / "path2"; diff --git a/be/test/util/threadpool_test.cpp b/be/test/util/threadpool_test.cpp index d17026356b..f9866a77f7 100644 --- a/be/test/util/threadpool_test.cpp +++ b/be/test/util/threadpool_test.cpp @@ -314,6 +314,7 @@ TEST_F(ThreadPoolTest, TestZeroQueueSize) { // deadlocks, so we'll disable the entire test instead. #ifndef THREAD_SANITIZER TEST_F(ThreadPoolTest, TestDeadlocks) { + ::testing::FLAGS_gtest_death_test_style = "threadsafe"; const char* death_msg = "called pool function that would result in deadlock"; ASSERT_DEATH( {