Skip to content

Skip active io time test if valgrind is used#3124

Merged
zuiderkwast merged 1 commit into
valkey-io:unstablefrom
dvkashapov:active-test-skip
Jan 29, 2026
Merged

Skip active io time test if valgrind is used#3124
zuiderkwast merged 1 commit into
valkey-io:unstablefrom
dvkashapov:active-test-skip

Conversation

@dvkashapov

Copy link
Copy Markdown
Member

If valgrind is used then test for used_active_time_io_thread fails because valgrind is slow, so skip it

[err]: Force the use of IO threads and assert active IO thread usage in tests/unit/io-threads.tcl                                                                                                                     
Expected (7.941596 - 5.876588) < (1000/1000) (context: type eval line 53 cmd {assert {($used_active_time - $initial_active_times($i)) < ($sleep_time_ms/1000)}} proc ::test)

Comment thread tests/unit/io-threads.tcl Outdated
@codecov

codecov Bot commented Jan 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.81%. Comparing base (8a9c371) to head (ef2696d).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3124      +/-   ##
============================================
- Coverage     74.87%   74.81%   -0.07%     
============================================
  Files           129      129              
  Lines         71199    71199              
============================================
- Hits          53310    53264      -46     
- Misses        17889    17935      +46     

see 20 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, great, thanks!

Maybe in the future, we can make it possible to use skip directy under start_server, or to introduce a tag valgrind:skip to make it possible to skip before even before starting a server. We have a few more skipped test cases for valgrind that could use a tag like that.

@zuiderkwast zuiderkwast merged commit 4638b55 into valkey-io:unstable Jan 29, 2026
24 checks passed
@dvkashapov

Copy link
Copy Markdown
Member Author

Created issue for that, definitely a good idea!

@dvkashapov dvkashapov deleted the active-test-skip branch January 29, 2026 17:10
harrylin98 pushed a commit to harrylin98/valkey_forked that referenced this pull request Feb 19, 2026
If valgrind is used then test for used_active_time_io_thread fails
because valgrind is slow, so skip it

```
[err]: Force the use of IO threads and assert active IO thread usage in tests/unit/io-threads.tcl                                                                                                                     
Expected (7.941596 - 5.876588) < (1000/1000) (context: type eval line 53 cmd {assert {($used_active_time - $initial_active_times($i)) < ($sleep_time_ms/1000)}} proc ::test)
```

Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
hpatro pushed a commit to hpatro/valkey that referenced this pull request Mar 5, 2026
If valgrind is used then test for used_active_time_io_thread fails
because valgrind is slow, so skip it

```
[err]: Force the use of IO threads and assert active IO thread usage in tests/unit/io-threads.tcl
Expected (7.941596 - 5.876588) < (1000/1000) (context: type eval line 53 cmd {assert {($used_active_time - $initial_active_times($i)) < ($sleep_time_ms/1000)}} proc ::test)
```

Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
Taeknology added a commit to Taeknology/valkey that referenced this pull request May 19, 2026
The delta-from-initial-baseline assertion measures cumulative active
time across the entire test (toggle + sleep + final activation). As
the monotonic counter (src/io_threads.c:27) accumulates, this bound
is fragile: PR valkey-io#3124 had to add valgrind:skip after the same form
failed under valgrind. The remaining delta-from-pre-sleep assertion
covers the real invariant — io_threads should idle during sleep and
only the final reactivation contributes to the post-sleep delta.

Addresses review feedback on valkey-io#3764.

Signed-off-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants