Skip to content

IGMPv3 tests: Move truncated example from inlined array to a hex resource file. - #2225

Open
Dimi1010 wants to merge 2 commits into
seladb:devfrom
Dimi1010:igmpv3-move-to-file
Open

IGMPv3 tests: Move truncated example from inlined array to a hex resource file.#2225
Dimi1010 wants to merge 2 commits into
seladb:devfrom
Dimi1010:igmpv3-move-to-file

Conversation

@Dimi1010

Copy link
Copy Markdown
Collaborator

This moves the truncated array to a data file to conform with other tests and allow usage of the pcpp_tests::createPacketFromHexResource machinery.

Includes modifications to the ResourceProvider as it was used to generate the data file from the inlined array.

  • Adds freeze and unfreeze actions to ResourceProvider to allow modifying the frozen setting.
  • Changes ResourceProvider::saveResource to be non-const action.

Includes modifications to the ResourceProvider as it was used to generate the data file from the inlined array.
- Adds freeze and unfreeze actions to ResourceProvider to allow modifying the frozen setting.
- Changes `ResourceProvider::saveResource` to be non-const action.
/// @throw std::runtime_error if the provider is frozen and does not allow saving.
void saveResource(ResourceType resourceType, const char* filename, const uint8_t* data,
size_t length) const;
void saveResource(ResourceType resourceType, const char* filename, const uint8_t* data, size_t length);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Stripped the const since it conceptually mutates the resource store.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.66%. Comparing base (200853b) to head (8896050).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2225      +/-   ##
==========================================
+ Coverage   81.30%   82.66%   +1.35%     
==========================================
  Files         319      332      +13     
  Lines       52180    60258    +8078     
  Branches    12124    12860     +736     
==========================================
+ Hits        42423    49810    +7387     
- Misses       7519     9033    +1514     
+ Partials     2238     1415     -823     
Flag Coverage Δ
23.11.6 7.28% <0.00%> (?)
24.11.5 7.26% <0.00%> (?)
25.11.1 7.29% <0.00%> (?)
alpine320 76.86% <100.00%> (-0.01%) ⬇️
fedora42 76.44% <100.00%> (-0.01%) ⬇️
macos-15 82.26% <100.00%> (+<0.01%) ⬆️
macos-26 82.26% <100.00%> (-0.01%) ⬇️
macos-26-intel 82.19% <100.00%> (-0.01%) ⬇️
mingw32 71.47% <ø> (ø)
mingw64 71.44% <ø> (+0.07%) ⬆️
rhel94 76.24% <100.00%> (+0.01%) ⬆️
ubuntu2204 76.29% <100.00%> (+0.02%) ⬆️
ubuntu2404 76.57% <100.00%> (+0.01%) ⬆️
ubuntu2604 76.50% <100.00%> (-0.03%) ⬇️
ubuntu2604-arm64 76.37% <100.00%> (+0.02%) ⬆️
ubuntu2604-icpx 59.08% <ø> (+0.02%) ⬆️
unittest 82.66% <100.00%> (+1.35%) ⬆️
windows-2022 85.79% <ø> (?)
windows-2025 85.53% <ø> (?)
winpcap 85.83% <ø> (?)
xdp 52.96% <100.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@Dimi1010
Dimi1010 marked this pull request as ready for review August 19, 2026 18:02
@Dimi1010
Dimi1010 requested a review from seladb as a code owner August 19, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants