Skip to content

Conversation

@maramsmurthy
Copy link
Contributor

@maramsmurthy maramsmurthy commented Nov 27, 2025

  • Updated regex for slot_ibm to include optional -R\d+ segment.
    This allows matching both standard and extended slot formats:
    • Standard: U50EE.001.WZS00TL-P3-C14
    • Extended: U50EE.001.WZS00TL-P3-C14-R1
  • Change ensures compatibility with newer hardware naming conventions
    that include resource identifiers after the slot number.

Backward Compatibility:

  • Existing slot formats without -R remain fully supported.
  • No impact on current parsing logic for standard slot names.

Testing Impact:

  • Verified regex against both formats to ensure correct matching.
  • Additional unit tests recommended for extended slot names to prevent
    regressions.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced PCI slot pattern recognition to support IBM slot naming conventions with revision/reset suffixes, improving compatibility with a broader range of system configurations and ensuring accurate slot identification.

✏️ Tip: You can customize this high-level summary in your review settings.

richtja and others added 30 commits August 13, 2025 17:18
The utility deprecation warning on `aurl` utility is causing troubles,
because it's logged every time the utility is used, which pollutes test
logs. This commit will log the warning only once and also makes the
solution more general for future use during the AAutils migration.

Assisted-by: Cursor with gemini-2.5-pro
Reference: avocado-framework#6176
Signed-off-by: Jan Richter <[email protected]>
since the path development has been migrated to AAutils we need to
inform users and developers about this change.

Reference: avocado-framework/aautils#84
Signed-off-by: Jan Richter <[email protected]>
Improve VMImage caching and asset handling functionality.

- Enhanced asset.py to handle direct file paths and normal asset names
- Better error handling and logging in get_metadata()
- Refactored _find_cached_image() to use Asset functionality
- Fixed multiple Pylint warnings (too-many-branches, protected-access, etc.)
- Improved network error handling in provider selection

Assisted By: Cursor GPT-5
Signed-off-by: Harvey Lynden <[email protected]>
Update Fedora provider to use archive URLs for versions <= 40
instead of <= 38 to fix download failures for Fedora 39/40.

Assisted By: Cursor GPT-5
Signed-off-by: Harvey Lynden <[email protected]>
Announcement of deprecation of data_structures.

Signed-off-by: Harvey Lynden <[email protected]>
Without this change, running the gdb example
tests (examples/tests/gdbtest.py) will fail on newer gcc.

Signed-off-by: Cleber Rosa <[email protected]>
These module level variables were used to control the behavior of the
gdb utility from the command line plugin.  The plugin was never
migrated to nrunner due to the parallelism aspects, so these are not
needed anymore.

Signed-off-by: Cleber Rosa <[email protected]>
This is a set of docstrings updates to prepare this utility for
migration to AAutils project.

Reference: avocado-framework/aautils#82
Assisted-by: Cursor Claude 4 Sonnet
Signed-off-by: Cleber Rosa <[email protected]>
For the distro version 8 and older releases distro version less than 9 check is sufficient

Signed-off-by: Pavaman Subramaniyam <[email protected]>
There's a clear mistake in the assigment made, which overwrites an
unintended variable.  This is because of the variable rename from
upper to lower case in commit 57dcecf.

Signed-off-by: Cleber Rosa <[email protected]>
The GDB example tests all depend on gcc because of the shared setUp()
method.  Then, some will use only the GDB class (and thus depend on
the "gdb" binary), while others will use both GDB and GDBServer
classes (and thus also depend on the "gdbserver" binary).

This fortifies the execution of these tests in environments without
those external software packages installed.

Signed-off-by: Cleber Rosa <[email protected]>
There's a functional GDB test that is being shipped only as an
example test.  We can make it run during the selftests to
increase the module coverage (and avoid regression as could be
observed in the last few commits).

Signed-off-by: Cleber Rosa <[email protected]>
Migration of External Util Pylint

Reference: avocado-framework/aautils#38
Signed-off-by: Harvey Lynden <[email protected]>
This is a docstring update for network utility as preparation for AAutils
migration.

Assisted-by: Cursor with gemini-2.5-pro
Reference: avocado-framework/aautils#76
Signed-off-by: Jan Richter <[email protected]>
This is a set of unit tests updates and checks to prepare
avocado.utils.network utility for migration to AAutils project.

Assisted-by: Cursor with gemini-2.5-pro
Reference: avocado-framework/aautils#76
Signed-off-by: Jan Richter <[email protected]>
The check for packet loss wasn't considering losses of full numbers like
10, 20, ..., 100. All of them would be considered as 0%. This commit
fixes it.

Assisted-by: Cursor with gemini-2.5-pro
Signed-off-by: Jan Richter <[email protected]>
When the device doesn't have any ip address the nm_flush_ipadd method
would still run `ip addr delete`. This commit avoids it.

Assisted-by: Cursor with gemini-2.5-pro
Signed-off-by: Jan Richter <[email protected]>
Since the network.ports development has been migrated to AAutils we need
to inform users and developers about this change.

Reference: avocado-framework/aautils#88
Signed-off-by: Jan Richter <[email protected]>
Warning of development moving over to AAutils for
External Modules.

Reference: avocado-framework/aautils#69
Signed-off-by: Harvey Lynden <[email protected]>
This fixes a number of issues with a pre-release check for the latest
avocado build:

 1. The repo with the actual latest build is called
    "avocado-latest" (while the latest released build
    is called "avocado-latest-release")

 2. Fedora 40 has been EOL'd and it's been bumped to 42

The new container images with these changes are already deployed on
quay.io.

Signed-off-by: Cleber Rosa <[email protected]>
The LEAP 15.2 version has been EOL'd and removed from the website.
The other versions suffered a few naming adjustments, which this
covers.

Signed-off-by: Cleber Rosa <[email protected]>
Increase Code Coverage - Added RST Docstrings

Reference: avocado-framework/aautils#42
Assisted-By: Claude 4 Sonnet Cursor
Signed-off-by: Harvey Lynden <[email protected]>
On Python 3.9 and earlier, we're pinning the cffi dep.  With the most
recent cryptography release (46.0.0), a more recent cffi version is
required.  This causes the dependency resolution to be impossible.

Let's also pin the version of cryptography on Python 3.9, along with
cffi.

Signed-off-by: Cleber Rosa <[email protected]>
Assisted-by: Cursor with cloude-4-sonnet
Signed-off-by: Jan Richter <[email protected]>
Signed-off-by: Jan Richter <[email protected]>
We've seen headers and messages that make it difficult to review
pull requests or understand recent changes.

Explain the purpose of both a bit more and provide an example to
help contributors understand better what is expected and serve as
reference.

Signed-off-by: Sebastian Mitterle <[email protected]>
The TaskRunStatusService.test_task_status_service_lost, from
selftests/functional/nrunner.py, fails every now and then.  There are
a number of expectations with regards to the timing of both the
netcat process and listening socket, and the avocado-runner process.

The following changes are added here in an effort to mitigate or
eliminate those failures:

 * A wait was added after the netcat process starts, and before the
   avocado-runner process is created and started, improving the odds
   that the netcat socket will be available.

 * A longer execution time for the underlying executable (/bin/sleep)
   mitigates the possibility of it ending before netcat is killed.

 * A longer sleep after the avocado-runner process is started improves
   the odds of it having properly started and connected to the socket.

 * Waiting for the end of the netcat process makes sure the assertion
   is not tried without the connection having being broken on the
   netcat side.

Signed-off-by: Cleber Rosa <[email protected]>
harvey0100 and others added 8 commits November 22, 2025 13:04
Announcement of deprecation of Output

Signed-off-by: Harvey Lynden <[email protected]>
- Add comprehensive docstrings with parameter types, return values, and examples
- Include detailed descriptions for all functions
- Add proper Sphinx documentation formatting
- Remove redundant '(0s and 1s)' descriptions from bitlist functions
- Simplify iter_tabular_output docstring to original concise version
- Update spell.ignore for new documentation terms

Reference: avocado-framework/aautils#48
Assisted-By: Claude 4 Sonnet Cursor
Signed-off-by: Harvey Lynden <[email protected]>
- Add full test coverage for bitlist_to_string and string_to_bitlist functions
- Add tests for shell_escape function with various special characters
- Add tests for strip_console_codes with ANSI escape sequences
- Add tests for tabular output functions (iter_tabular_output, tabular_output)
- Add tests for string utility functions (string_safe_encode, string_to_safe_path)
- Add tests for type checking functions (is_bytes, is_text, to_text)
- Update check.py to include astring module in testing
- Condense multi-line bitlist definitions into readable one-liners

Reference: avocado-framework/aautils#48
Assisted-By: Claude 4 Sonnet Cursor
Signed-off-by: Harvey Lynden <[email protected]>
Normalize hex escape sequences to lowercase for consistency with Python
coding conventions. While both forms are functionally identical, lowercase
hex digits align with community standards and prevent potential linting
inconsistencies across different tools.

Signed-off-by: Harvey Lynden <[email protected]>
FreeBSD reserves /etc for the base system configuration.  All other
software should usr /usr/local/etc instead.

Reference: https://man.freebsd.org/cgi/man.cgi?hier(7)
Reported-by: Roman Bogorodskiy <[email protected]>
Signed-off-by: Cleber Rosa <[email protected]>
- Updated regex for `slot_ibm` to include optional `-R\d+` segment.
  This allows matching both standard and extended slot formats:
    - Standard: U50EE.001.WZS00TL-P3-C14
    - Extended: U50EE.001.WZS00TL-P3-C14-R1
- Change ensures compatibility with newer hardware naming conventions
  that include resource identifiers after the slot number.

Backward Compatibility:
- Existing slot formats without `-R` remain fully supported.
- No impact on current parsing logic for standard slot names.

Testing Impact:
- Verified regex against both formats to ensure correct matching.
- Additional unit tests recommended for extended slot names to prevent
  regressions.

Signed-off-by: Maram Srimannarayana Murthy <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

Walkthrough

The change modifies the IBM slot parsing regex pattern in avocado/utils/pci.py by extending it with an optional suffix. The regex was updated from r"((\w+)[.])+(\w+)-[PC(\d+)-]*C(\d+)" to r"((\w+)[.])+(\w+)-[PC(\d+)-]*C(\d+)(?:-R\d+)?", adding a non-capturing optional group (?:-R\d+)? to recognize slot strings that may end with "-R" followed by one or more digits. The existing matching behavior is preserved while enabling additional slot format variations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single-file, single-line regex pattern modification
  • Straightforward extension using a non-capturing optional group
  • No logic changes or behavioral side effects to verify
  • Minimal scope with clear intent to support an additional slot name format suffix

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title references 'dlpar.py' but the actual change is in 'avocado/utils/pci.py'. However, the core objective of enhancing regex for optional R suffix in slot format is accurately captured. Update the title to reference the correct file: 'avocado/utils/pci.py: Enhance regex to support optional R suffix in slot format' or adjust to reflect the actual file modified.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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 and usage tips.

@mr-avocado mr-avocado bot moved this to Review Requested in Default project Nov 27, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
avocado/utils/pci.py (1)

203-205: Regex extension for optional -R suffix looks correct

The updated pattern cleanly extends the previous behavior: existing slot strings still match, and the new optional non-capturing (?:-R\d+)? correctly covers cases like ...-C14-R1 without affecting group() semantics. Given how hardware naming tends to evolve, this looks like a safe, backward‑compatible change.

If not already covered elsewhere, consider adding unit tests for both formats (with and without -R<digits>) to lock this behavior in and avoid future regressions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 74b7379 and 66fb50d.

📒 Files selected for processing (1)
  • avocado/utils/pci.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: Linux with Python 3.13
  • GitHub Check: Linux with Python 3.12
  • GitHub Check: Linux with Python 3.11
  • GitHub Check: Linux with Python 3.10
  • GitHub Check: Linux with Python 3.9
  • GitHub Check: Fedora develop install/uninstall task
  • GitHub Check: Egg task ubi:8.8
  • GitHub Check: Version task debian:12.4
  • GitHub Check: Fedora selftests
  • GitHub Check: Version task ubuntu:22.04
  • GitHub Check: Podman spawner with 3rd party runner plugin
  • GitHub Check: Code Coverage (3.11)
  • GitHub Check: Windows with Python 3.11
  • GitHub Check: Version task ubi:8.8
  • GitHub Check: macOS with Python 3.11
  • GitHub Check: Static checks

@maramsmurthy
Copy link
Contributor Author

As commits which are not part of this branch appeared here due to some issue with branch. Will be raising another PR by clearing these discrepancies.

@github-project-automation github-project-automation bot moved this from Review Requested to Done 113 in Default project Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done 113

Development

Successfully merging this pull request may close these issues.

6 participants