Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] CMake preset for Valgrind #42109

Closed
kou opened this issue Jun 11, 2024 · 1 comment
Closed

[C++] CMake preset for Valgrind #42109

kou opened this issue Jun 11, 2024 · 1 comment

Comments

@kou
Copy link
Member

kou commented Jun 11, 2024

Describe the enhancement requested

We need to specify some CMake options to use Valgrind for our tests. If we provide a CMake preset for Valgrind, we don't need to remember what CMake options should be specified.

See also environment variables specified in conda-cpp-valgrind:

arrow/docker-compose.yml

Lines 322 to 336 in 6597467

# Shrink test runtime by enabling minimal optimizations
ARROW_C_FLAGS_DEBUG: "-g1 -Og"
ARROW_CXX_FLAGS_DEBUG: "-g1 -Og"
# GH-39973: Do not use debug memory pool for valgrind
ARROW_DEBUG_MEMORY_POOL: "none"
ARROW_ENABLE_TIMING_TESTS: # inherit
ARROW_FLIGHT: "OFF"
ARROW_FLIGHT_SQL: "OFF"
ARROW_GANDIVA: "OFF"
ARROW_JEMALLOC: "OFF"
ARROW_RUNTIME_SIMD_LEVEL: "AVX2" # AVX512 not supported by Valgrind (ARROW-9851)
ARROW_TEST_MEMCHECK: "ON"
ARROW_USE_LD_GOLD: "ON"
BUILD_WARNING_LEVEL: "PRODUCTION"
ARROW_CTEST_TIMEOUT: 500

Component(s)

C++

kou added a commit to kou/arrow that referenced this issue Jun 11, 2024
kou added a commit to kou/arrow that referenced this issue Jun 11, 2024
kou added a commit that referenced this issue Jun 13, 2024
### Rationale for this change

If we want to use Valgrind for our tests, we need to specify at least the following CMake options:

* `ARROW_RUNTIME_SIMD_LEVEL=AVX2`
* `ARROW_TEST_MEMCHECK=ON`

If we have a CMake preset for Valgrind, we don't need to remember them.

### What changes are included in this PR?

Add `features-valgrind` and `ninja-debug-valgrind` preset. `features-valgrind` is a hidden preset.

### Are these changes tested?

Yes. I used this to reproduce #42107 on local.

### Are there any user-facing changes?

No.
* GitHub Issue: #42109

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 17.0.0 milestone Jun 13, 2024
@kou
Copy link
Member Author

kou commented Jun 13, 2024

Issue resolved by pull request 42110
#42110

@kou kou closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant