Skip to content

Conversation

@richm
Copy link
Contributor

@richm richm commented Jul 31, 2025

Signed-off-by: Rich Megginson rmeggins@redhat.com

Summary by Sourcery

Add detailed debug logging to the PCI interface tests by listing system network and PCI data, capturing nftables state before and after tests, and diffing results for easier troubleshooting.

Enhancements:

  • Add debug tasks to capture network interface details and sysfs PCI information during tests
  • Capture and diff nftables ruleset before and after the PCI interface tests
  • Create and clean up a temporary directory for storing debug outputs

Tests:

  • Add a new tests/provision.fmf file

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 31, 2025

Reviewer's Guide

This PR enhances the PCI interface test by injecting verbose shell-based debug steps for network and sysfs inspection, capturing nftables rulesets before and after rule application for diff analysis, and introduces a new FMF provisioning configuration file.

File-Level Changes

Change Details Files
Add verbose network and sysfs debug output to PCI interface test
  • Enable strict shell mode with set -euxo pipefail
  • Redirect standard output to stderr
  • Print IP addresses and list /sys/class/net details
  • Display vendor and device IDs from sysfs
tests/tests_interface_pci.yml
Capture and diff nftables ruleset around test execution
  • Create a temporary directory using the tempfile module
  • Dump nftables ruleset before test into temp file
  • Dump nftables ruleset after test, run diff, and output result
  • Clean up temporary directory
tests/tests_interface_pci.yml
Introduce new FMF provisioning configuration
  • Add tests/provision.fmf to define test provisioning settings
tests/provision.fmf

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @richm - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.41%. Comparing base (2d7c4ba) to head (ae088ba).
⚠️ Report is 91 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #285      +/-   ##
==========================================
- Coverage   61.09%   58.41%   -2.69%     
==========================================
  Files           2        2              
  Lines         910     1188     +278     
==========================================
+ Hits          556      694     +138     
- Misses        354      494     +140     
Flag Coverage Δ
sanity ?

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@richm richm marked this pull request as draft July 31, 2025 15:00
@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

3 similar comments
@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm force-pushed the test-debug-interface branch from 5e37926 to ae088ba Compare July 31, 2025 21:01
@richm
Copy link
Contributor Author

richm commented Jul 31, 2025

[citest]

@richm richm marked this pull request as ready for review July 31, 2025 21:29
@richm richm merged commit ec4c2e0 into linux-system-roles:main Jul 31, 2025
36 checks passed
@richm richm deleted the test-debug-interface branch July 31, 2025 21:30
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @richm - I've reviewed your changes - here's some feedback:

  • Add a task to install pciutils before using lspci to ensure the debug output is always available.
  • Integrate the new tests/provision.fmf into an existing test plan or update CI to pick it up, otherwise it won’t be used.
  • Consider refactoring the repeated shell debug steps into a reusable role or guard them with a debug variable to avoid cluttering logs.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add a task to install pciutils before using lspci to ensure the debug output is always available.
- Integrate the new tests/provision.fmf into an existing test plan or update CI to pick it up, otherwise it won’t be used.
- Consider refactoring the repeated shell debug steps into a reusable role or guard them with a debug variable to avoid cluttering logs.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant