Skip to content

unittests: convert util-spm tests to FAIL/PASS API#15336

Open
0x-0ddc0de wants to merge 1 commit intoOISF:mainfrom
0x-0ddc0de:redmine-6334
Open

unittests: convert util-spm tests to FAIL/PASS API#15336
0x-0ddc0de wants to merge 1 commit intoOISF:mainfrom
0x-0ddc0de:redmine-6334

Conversation

@0x-0ddc0de
Copy link
Copy Markdown

Most old printf statements for failing conditions were removed during the FAIL/PASS conversion. I kept the printfs in the nested offset-search loops because a bare FAIL_IF would only identify the failing line, not the specific needle/text/offset combination that failed.

Issue: 6334

@0x-0ddc0de 0x-0ddc0de requested a review from victorjulien as a code owner May 8, 2026 04:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

NOTE: This PR may contain new authors.

@jufajardini
Copy link
Copy Markdown
Contributor

Code and commit message looking ok, allowing CI checks to run.

The tests clean-up could have maybe minor optimizations, but not mandatory for this patch, imho.

Copy link
Copy Markdown
Contributor

@jufajardini jufajardini left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

The check about code formatting means that you'll have to run clang-format locally, to fix that:

./scripts/clang-format.sh check-branch

If this results in too many changes, especially touching areas of the file you didn't work on, please keep them in a separate commit, to make it easier to review.
Please submit a new PR with that, and make sure that you use the same email address used when you signed the Contribution Agreement to sign your commit message! :)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.66%. Comparing base (72e3d7a) to head (de96af3).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15336      +/-   ##
==========================================
- Coverage   82.66%   82.66%   -0.01%     
==========================================
  Files         993      995       +2     
  Lines      271004   271031      +27     
==========================================
+ Hits       224022   224043      +21     
- Misses      46982    46988       +6     
Flag Coverage Δ
fuzzcorpus 61.05% <ø> (-0.03%) ⬇️
livemode 18.37% <ø> (-0.02%) ⬇️
netns 22.58% <ø> (-0.08%) ⬇️
pcap 45.16% <ø> (-0.12%) ⬇️
suricata-verify 66.39% <ø> (-0.01%) ⬇️
unittests 58.57% <81.81%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0x-0ddc0de 0x-0ddc0de mentioned this pull request May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants