This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e8ac43081 GH-41004: [C++][FS][Azure] Don't run 
TestGetFileInfoGenerator() with Valgrind (#41163)
6e8ac43081 is described below

commit 6e8ac430816b84d295ddf89709c4b42e558b2f7e
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Apr 12 11:37:32 2024 +0900

    GH-41004: [C++][FS][Azure] Don't run TestGetFileInfoGenerator() with 
Valgrind (#41163)
    
    ### Rationale for this change
    
    `GetFileInfo()` with generator reports false positive memory leak in Azure 
SDK for C++.
    
    ### What changes are included in this PR?
    
    Don't run `TestGetFileInfoGenerator()` with Valgrind.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #41004
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/src/arrow/filesystem/test_util.cc | 3 ++-
 cpp/src/arrow/util/config.h.cmake     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpp/src/arrow/filesystem/test_util.cc 
b/cpp/src/arrow/filesystem/test_util.cc
index 19226ce01a..accb7a47ab 100644
--- a/cpp/src/arrow/filesystem/test_util.cc
+++ b/cpp/src/arrow/filesystem/test_util.cc
@@ -33,6 +33,7 @@
 #include "arrow/testing/future_util.h"
 #include "arrow/testing/gtest_util.h"
 #include "arrow/util/async_generator.h"
+#include "arrow/util/config.h"
 #include "arrow/util/io_util.h"
 #include "arrow/util/key_value_metadata.h"
 #include "arrow/util/vector.h"
@@ -752,7 +753,7 @@ void 
GenericFileSystemTest::TestGetFileInfoSelector(FileSystem* fs) {
 }
 
 void GenericFileSystemTest::TestGetFileInfoGenerator(FileSystem* fs) {
-#ifdef ADDRESS_SANITIZER
+#if defined(ADDRESS_SANITIZER) || defined(ARROW_TEST_MEMCHECK)
   if (have_false_positive_memory_leak_with_generator()) {
     GTEST_SKIP() << "Filesystem have false positive memory leak with 
generator";
   }
diff --git a/cpp/src/arrow/util/config.h.cmake 
b/cpp/src/arrow/util/config.h.cmake
index 9fbd685084..5ab10c5c49 100644
--- a/cpp/src/arrow/util/config.h.cmake
+++ b/cpp/src/arrow/util/config.h.cmake
@@ -57,6 +57,7 @@
 #cmakedefine ARROW_GCS
 #cmakedefine ARROW_HDFS
 #cmakedefine ARROW_S3
+#cmakedefine ARROW_TEST_MEMCHECK
 #cmakedefine ARROW_USE_GLOG
 #cmakedefine ARROW_USE_NATIVE_INT128
 #cmakedefine ARROW_WITH_BROTLI

Reply via email to