Skip to content

Comments

Allow some tags only on top level to fix --tags filtering#3171

Merged
zuiderkwast merged 6 commits intovalkey-io:unstablefrom
dvkashapov:refactor-tags
Feb 9, 2026
Merged

Allow some tags only on top level to fix --tags filtering#3171
zuiderkwast merged 6 commits intovalkey-io:unstablefrom
dvkashapov:refactor-tags

Conversation

@dvkashapov
Copy link
Member

@dvkashapov dvkashapov commented Feb 6, 2026

The problem: when running ./runtest --large-memory --tags large-memory the --tags large-memory filter would look for tests with large-memory tag, it found the nested tag in the test context but start_server didn't have large-memory, so the filtering logic had issues. And that's why we did not notice how we introduced this failure:

[err]: CVE-2025-32023: Sparse HLL XZERO overflow triggers crash in tests/unit/hyperloglog.tcl
Expected an error matching '*INVALIDOBJ*' but got '1' (context: type eval line 24 cmd {assert_error {*INVALIDOBJ*} {r pfadd hll_overflow foo}} proc ::test)

Tags large-memory, needs:other-server, compatible-redis, and network now restricted to top-level start_server. Prevents --tags filtering issues when these tags appear in nested contexts. Added validation that errors on nested usage. Refactored tests that fail new validation. Also fixed all lsearch calls to use -exact flag to preventing bugs like "tls" matching "tls:skip".

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

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Awesome. Please also mention in the top comment the problem test case that didn't run in any of our Daily and CI because how --tags -large-memory skipped it and --tags large-memory missed the nested tag because it was under another tag that got skipped.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.98%. Comparing base (839d0c6) to head (79518bf).
⚠️ Report is 8 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3171      +/-   ##
============================================
+ Coverage     74.96%   74.98%   +0.01%     
============================================
  Files           129      129              
  Lines         71318    71320       +2     
============================================
+ Hits          53467    53481      +14     
+ Misses        17851    17839      -12     

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.

dvkashapov and others added 2 commits February 8, 2026 11:42
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
@dvkashapov dvkashapov added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 8, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 8, 2026
Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
@dvkashapov dvkashapov added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 9, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 9, 2026
Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
@zuiderkwast zuiderkwast added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 9, 2026
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Very good, this should prevent tests from being always-skipped in the future.

Copy link
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

Thanks!

@zuiderkwast zuiderkwast merged commit 185d2ad into valkey-io:unstable Feb 9, 2026
56 of 63 checks passed
@dvkashapov dvkashapov deleted the refactor-tags branch February 9, 2026 11:04
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Feb 9, 2026
harrylin98 pushed a commit to harrylin98/valkey_forked that referenced this pull request Feb 19, 2026
…o#3171)

The problem: when running `./runtest --large-memory --tags large-memory`
the `--tags large-memory` filter would look for tests with
`large-memory` tag, it found the nested tag in the test context but
`start_server` didn't have `large-memory`, so the filtering logic had
issues. And that's why we did not notice how we introduced this failure:

```
[err]: CVE-2025-32023: Sparse HLL XZERO overflow triggers crash in tests/unit/hyperloglog.tcl
Expected an error matching '*INVALIDOBJ*' but got '1' (context: type eval line 24 cmd {assert_error {*INVALIDOBJ*} {r pfadd hll_overflow foo}} proc ::test)
```

Tags `large-memory`, `needs:other-server`, `compatible-redis`, and
`network` now restricted to top-level `start_server`. Prevents `--tags`
filtering issues when these tags appear in nested contexts. Added
validation that errors on nested usage. Refactored tests that fail new
validation. Also fixed all `lsearch` calls to use `-exact` flag to
preventing bugs like "tls" matching "tls:skip".

---------

Signed-off-by: Daniil Kashapov <daniil.kashapov.ykt@gmail.com>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
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.

3 participants