adamreeve opened a new issue, #40327:
URL: https://github.com/apache/arrow/issues/40327

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Some C++ tests are being incorrectly skipped due to missing preprocessor 
definitions. 
   
   Eg. If I build Arrow C++ with Parquet encryption and Snappy enabled, then 
run the Parquet encryption key management tests:
   ```
   cd cpp
   
   cmake -B build -S . \
     --preset ninja-debug-python \
     -DCMAKE_INSTALL_PREFIX=$PWD/../dist \
     -DCMAKE_INSTALL_LIBDIR=lib \
     -DARROW_BUILD_TESTS=ON \
     -DARROW_BUILD_INTEGRATION=ON \
     -DARROW_BUILD_STATIC="OFF" \
     -DARROW_COMPUTE="ON" \
     -DARROW_CSV="ON" \
     -DARROW_ACERO="ON" \
     -DARROW_DATASET="ON" \
     -DARROW_FILESYSTEM="ON" \
     -DARROW_JSON="ON" \
     -DARROW_MIMALLOC="ON" \
     -DARROW_ORC="ON" \
     -DARROW_PARQUET="ON" \
     -DARROW_SUBSTRAIT="ON" \
     -DARROW_ENABLE_THREADING="ON" \
     -DARROW_WITH_BROTLI="ON" \
     -DARROW_WITH_BZ2="ON" \
     -DARROW_WITH_LZ4="ON" \
     -DARROW_WITH_RE2="ON" \
     -DARROW_WITH_SNAPPY="ON" \
     -DARROW_WITH_UTF8PROC="ON" \
     -DARROW_WITH_ZLIB="ON" \
     -DARROW_WITH_ZSTD="ON" \
     -DPARQUET_REQUIRE_ENCRYPTION="ON"
   
   cmake --build build
   
   ./build/debug/parquet-encryption-key-management-test
   ```
   
   I see that a bunch of tests are skipped saying that Snappy hasn't been 
enabled:
   ```
   ...
   [ RUN      ] TestEncryptionKeyManagement.WrapLocally                         
  
   /home/adam/dev/arrow/cpp/src/parquet/encryption/key_management_test.cc:57: 
Skipped                                                                         
    
   Test requires Snappy compression                                             
  
   [  SKIPPED ] TestEncryptionKeyManagement.WrapLocally (0 ms)
   ...
   ```
   
   Due to this check:
   
https://github.com/apache/arrow/blob/640667664abbdb9ddf38d32781715cc783a69885/cpp/src/parquet/encryption/key_management_test.cc#L55-L65
   
   If I comment out that check then the tests pass correctly.
   
   I used git bisect and found that this was caused by #40222 (cc @kou).
   
   I haven't looked for any other tests that are also incorrectly skipped so 
suspect there could be a lot more like this.
   
   Also, if I run the tests at the previous commit before that PR merge 
(193e39cad4d8e1a01376d6b5199077e401484838) I see some tests were already 
incorrectly skipped due to another missing definition for 
`ARROW_ENABLE_THREADING`. So even if the above PR is reverted or fixed, it 
looks like this was already a problem:
   
   ```
   [ RUN      ] TestEncryptionKeyManagementMultiThread.WrapLocally              
  
   /home/adam/dev/arrow/cpp/src/parquet/encryption/key_management_test.cc:328: 
Skipped                                                                         
  
   Test requires threading support                                              
  
   [  SKIPPED ] TestEncryptionKeyManagementMultiThread.WrapLocally (0 ms) 
   ```
   
   I'm testing with GCC 13.2.1 and cmake 3.27.7 on Fedora 39, and initially 
noticed this at commit 640667664abbdb9ddf38d32781715cc783a69885 on the main 
branch.
   
   ### Component(s)
   
   C++


-- 
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]

Reply via email to