Skip to content

Fix bug in UDP checksum test#156

Merged
JulianSchmid merged 4 commits into
masterfrom
udp-big-endian-test-fix
Jul 4, 2026
Merged

Fix bug in UDP checksum test#156
JulianSchmid merged 4 commits into
masterfrom
udp-big-endian-test-fix

Conversation

@JulianSchmid

@JulianSchmid JulianSchmid commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Closes #155

Summary by CodeRabbit

  • Tests
    • Expanded automated CI test coverage by adding a new Linux big-endian target (linux-ppc64-stable) to the test matrix.
    • Adjusted CI test configuration to control PROPTEST_CASES per target, reducing iterations for emulated runs.
    • Improved UDP checksum-related test expectations for IPv4 and IPv6 scenarios to better validate checksum derivation.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a Linux ppc64 stable CI test target, forwards PROPTEST_CASES into Cross for cross-compiled test runs, and removes .to_le() from five UDP checksum proptest cases.

Changes

CI and UDP test updates

Layer / File(s) Summary
Add ppc64 cross-test target
.github/workflows/main.yml, Cross.toml
Adds linux-ppc64-stable to the test matrix, includes a matching powerpc64-unknown-linux-gnu entry with reduced proptest cases, and passes PROPTEST_CASES through GitHub Actions and Cross.
Adjust UDP checksum proptests
etherparse/src/transport/udp_header.rs
Removes .to_le() from sourceless_checksum calculations in five IPv4 and IPv6 checksum proptest cases.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main change: a fix in UDP checksum tests, including the checksum-related test adjustment.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch udp-big-endian-test-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
.github/workflows/main.yml (1)

10-101: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Consider adding an explicit permissions: block.

Static analysis flags the workflow as running with default (broad) GITHUB_TOKEN permissions since no permissions: block is defined. Scoping this down (e.g., contents: read) follows least-privilege practice for CI workflows.

🔒 Suggested addition
+permissions:
+  contents: read
+
 jobs:
   test:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/main.yml around lines 10 - 101, The main workflow job in
main.yml is using the default broad GITHUB_TOKEN scope because no permissions
block is set. Add an explicit permissions configuration for the test job, scoped
to the minimum needed (for example, contents: read), near the test matrix job
definition so the CI runs with least-privilege access.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/main.yml:
- Around line 10-101: The main workflow job in main.yml is using the default
broad GITHUB_TOKEN scope because no permissions block is set. Add an explicit
permissions configuration for the test job, scoped to the minimum needed (for
example, contents: read), near the test matrix job definition so the CI runs
with least-privilege access.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 460bbd72-10d1-4516-892b-f5ebe07e50a2

📥 Commits

Reviewing files that changed from the base of the PR and between 73f1909 and fb6b52c.

📒 Files selected for processing (2)
  • .github/workflows/main.yml
  • Cross.toml
✅ Files skipped from review due to trivial changes (1)
  • Cross.toml

@JulianSchmid JulianSchmid merged commit 6b46390 into master Jul 4, 2026
12 checks passed
@JulianSchmid JulianSchmid deleted the udp-big-endian-test-fix branch July 4, 2026 08:06
@JulianSchmid JulianSchmid added this to the v0.21.0 milestone Jul 4, 2026
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.

tests fail on big endian.

1 participant