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

detect/transforms: test in place modifications of buffers #12194

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7409

Describe changes:

  • detect/transforms: fix and test in place modifications of buffers (aka do not use memcpy)

#12193 with clippy fixes

As is the case when chaining multiple transforms.

Ticket: 7409
@victorjulien
Copy link
Member

what is the "test" reference in the commit message? If this PR is a test, then it should just be a draft.

@catenacyber
Copy link
Contributor Author

what is the "test" reference in the commit message?

cargo unit tests

If this PR is a test, then it should just be a draft.

It is not a draft

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 98.86364% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.16%. Comparing base (ae10fc3) to head (83aba2e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12194      +/-   ##
==========================================
- Coverage   83.16%   83.16%   -0.01%     
==========================================
  Files         912      912              
  Lines      257066   257124      +58     
==========================================
+ Hits       213797   213843      +46     
- Misses      43269    43281      +12     
Flag Coverage Δ
fuzzcorpus 61.01% <72.72%> (+0.03%) ⬆️
livemode 19.41% <0.00%> (-0.01%) ⬇️
pcap 44.44% <24.24%> (+0.01%) ⬆️
suricata-verify 62.70% <90.90%> (-0.01%) ⬇️
unittests 59.18% <93.18%> (+<0.01%) ⬆️

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

@victorjulien
Copy link
Member

what is the "test" reference in the commit message?

cargo unit tests

If this PR is a test, then it should just be a draft.

It is not a draft

The language confuses me, making me think the commit is a test, an experiment.

Would the following reflect your intent?

detect/transforms: in place modifications of buffers

As is the case when chaining multiple transforms.

Add tests.

@catenacyber
Copy link
Contributor Author

Putting

detect/transforms: in place modifications of buffers
    
    As is the case when chaining multiple transforms.
    Avoids using memcpy in these cases.
    
    Add tests for these cases.
    
    Ticket: 7409

@catenacyber
Copy link
Contributor Author

Next in #12200

My intent was to highlight the testing part, but not to confuse...

@catenacyber catenacyber closed this Dec 2, 2024
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