# test timeouts vs slow debug tools like thread sanitizer

**URL:** https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425
**Category:** Development
**Created:** [May 20, 2026, 1:23am UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425 "2026-05-20T01:23:53Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [May 20, 2026, 1:23am UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/1 "2026-05-20T01:23:53Z")

</div>

Hi all,

I’ve recently been trying to get more VTK tests to pass under thread sanitizer. TSan can cause 10x runtime slowdown. This makes some tests timeout. Most interesting are ones like `IOEnSightPython-TestEnSightGoldCombinedReader` which set a custom timeout:

```auto
if (NOT VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader)
  set(VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader 300)
endif()
set_tests_properties(VTK::IOEnSightPython-TestEnSightGoldCombinedReader
  PROPERTIES TIMEOUT ${VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader})

```

ctest’s `--timeout` is not helpful, as, per its docs, it “sets a timeout on all tests that do not already have a timeout set on them via the TIMEOUT property.”

Other than editing that 300, is there an idiomatic way to lengthen the timeout?

Thanks,

Sean

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [May 20, 2026, 1:28pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/2 "2026-05-20T13:28:05Z")

</div>

I’m afraid not. In F3D we have a dedicated CMake var to handle the sanitizer usecase, and takes that into account for tests timetouts: [f3d/cmake/f3dTest.cmake at master · f3d-app/f3d · GitHub](https://github.com/f3d-app/f3d/blob/master/cmake/f3dTest.cmake#L176)

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [May 20, 2026, 2:00pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/3 "2026-05-20T14:00:47Z")

</div>

OK I’ve filed a suggestion with ctest: [https://gitlab.kitware.com/cmake/cmake/-/work\_items/27832](https://gitlab.kitware.com/cmake/cmake/-/work_items/27832)

But for now, for `IOEnSightPython-TestEnSightGoldCombinedReader` specifically, is specifying that 300 timeout even necessary? The comment makes it seem like it’s trying to make the timeout _larger_, but isn’t the ctest default 1500s? Seems like this stanza could just be removed, no?

Sean

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [May 20, 2026, 2:02pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/4 "2026-05-20T14:02:56Z")

</div>

> [@seanm](#):
>
> but isn’t the ctest default 1500s?

I dont think so, at least not in VTK.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 20, 2026, 2:33pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/5 "2026-05-20T14:33:09Z")

</div>

Would setting a larger value in `VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader` when you configure build would work for you? There are about 8 tests with such manually set timeouts, so you may need to override a few more. It would be certainly nicer to have a multiplier variable in VTK to scale all these hardcoded timeout values at once.

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [May 20, 2026, 2:46pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/6 "2026-05-20T14:46:37Z")

</div>

Hmm, what is the default timeout then? I know in my cdash submissions I specify `CTEST_TEST_TIMEOUT`, but if I just run `ctest` on my local computer, tests that timeout always seem to timeout after 1500s. Where does that come from?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 20, 2026, 4:56pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/7 "2026-05-20T16:56:37Z")

</div>

1500 comes from the [default `DART_TESTING_TIMEOUT` value](https://github.com/Kitware/CMake/blob/84e25b5859f87a25d1c8cd6a788e9504715bf341/Modules/CTest.cmake#L180). This is not documented well, as pointed out in this [CMake issue](https://gitlab.kitware.com/cmake/cmake/-/work_items/20450).

---

<div class="post-metadata">

### Author: ![seanm](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.vtk.org/u/seanm)
#### Post date: [May 20, 2026, 6:09pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/8 "2026-05-20T18:09:54Z")

</div>

Nice sleuthing Andras!

So then this comment about “extending” the timeout makes little sense to me:

```auto
# This test can take much longer on Windows than other platforms, so extend the timeout
if (NOT VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader)
  set(VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader 300)
endif()

```

It seems this is actually _decreasing_ the timeout vs the default 1500. Maybe ctest’s default was lower years ago?

Searching for `PROPERTIES TIMEOUT`, every other similar stanza also is setting \< 1500.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [May 20, 2026, 7:02pm UTC](https://discourse.vtk.org/t/test-timeouts-vs-slow-debug-tools-like-thread-sanitizer/16425/9 "2026-05-20T19:02:51Z")

</div>

VTK sets 100s timeout for its CI tests on gitlab (see for example [here](https://gitlab.kitware.com/vtk/vtk/-/blob/master/.gitlab/ci/ctest_test.cmake#L30)). Compared to that, 300s is an increase.

Instead of hardcoding `300`, it should be `VTK_TEST_DEFAULT_TIMEOUT` \* 3. Something like this (similar to what @mwestphal implemented in f3d):

```auto
if (NOT VTK_TEST_DEFAULT_TIMEOUT)
  set(VTK_TEST_DEFAULT_TIMEOUT 100)
endif()

...

# This test can take much longer on Windows than other platforms, so extend the timeout
if (NOT VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader)
  math(EXPR VTK_TEST_TIMEOUT_TestEnSightGoldCombinedReader "3 * ${VTK_TEST_DEFAULT_TIMEOUT}")
endif()

```

Custom timeout is used for 8 tests, so it could worth adding a helper function or macro for this.
