Skip to content

update: expand storage migration hotplug test to 4-disk conformance (CNV-88911)#5569

Open
Ahmad-Hafe wants to merge 1 commit into
RedHatQE:mainfrom
Ahmad-Hafe:feat/storage-migration-4disk-conformance
Open

update: expand storage migration hotplug test to 4-disk conformance (CNV-88911)#5569
Ahmad-Hafe wants to merge 1 commit into
RedHatQE:mainfrom
Ahmad-Hafe:feat/storage-migration-4disk-conformance

Conversation

@Ahmad-Hafe

@Ahmad-Hafe Ahmad-Hafe commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
What this PR does / why we need it:

Modifies TestStorageClassMigrationWithVolumeHotplug to meet the conformance requirement:
"Storage live migrates a VM with 4 disks, between two storage classes of the same provider"

Changes:

  • Replace container disk (fedora_vm_body / quay.io) with golden image DataSource for the boot disk — removes external registry dependency, enabling self-validation
  • Hotplug 3 blank DataVolumes instead of 1 (total 4 disks: 1 boot + 3 hotplugged)
  • Verify data integrity on all hotplugged disks after migration
  • Add @pytest.mark.conformance marker

Details:

  • The boot VM (fedora_vm_for_hotplug_and_storage_migration) now uses data_volume_template_with_source_ref_dict with a golden image DataSource, matching the pattern of other VM fixtures in the file
  • Blank DVs are created via create_dv with contextlib.ExitStack to manage multiple context managers in a loop
  • Volume hotplug uses virtctl_volume with ExitStack for the same reason
  • Old singular constants (HOTPLUGGED_DEVICE, MOUNT_HOTPLUGGED_DEVICE_PATH) and verify_file_in_hotplugged_disk replaced with plural equivalents generated from NUM_HOTPLUG_DISKS
  • No changes to other test classes (TestStorageClassMigrationAtoB, TestStorageClassMigrationWindowsWithVTPM) — they still use artifactory as before
Which issue(s) this PR fixes:
Special notes for reviewer:

The test has no external registry dependencies (no quay.io, no artifactory). It uses only golden images (already on the cluster) and blank DataVolumes, making it suitable for self-validation runs.

jira-ticket:

https://redhat.atlassian.net/browse/CNV-88911

Summary by CodeRabbit

  • Tests
    • Expanded storage migration coverage to validate multiple hotplugged disks instead of a single disk (configurable count).
    • Updated the hotplug migration scenario to create several blank disks, attach them to the VM, and mount each at a distinct mount point.
    • Refactored related fixtures, file-writing, and assertions so the expected file is verified across all hotplugged mount points after migration.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f4ac8ff6-c153-43ba-800c-fafb1207ac57

📥 Commits

Reviewing files that changed from the base of the PR and between 220cfd8 and 142e639.

📒 Files selected for processing (4)
  • tests/storage/storage_migration/conftest.py
  • tests/storage/storage_migration/constants.py
  • tests/storage/storage_migration/test_storage_class_migration.py
  • tests/storage/storage_migration/utils.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)

📝 Walkthrough

Walkthrough

The storage migration tests now create three hotplugged disks, attach and mount them on a Fedora VM, write test files to each mount, and verify their contents after migration.

Changes

Multi-disk hotplug storage migration

Layer / File(s) Summary
Multi-disk hotplug configuration
tests/storage/storage_migration/constants.py, tests/storage/storage_migration/conftest.py
Hotplug device and mount-path collections are generated for three disks and consumed by the fixtures.
Multi-disk fixture setup
tests/storage/storage_migration/conftest.py
Fixtures create, attach, mount, and populate multiple hotplugged data volumes on a Fedora VM built from a data source template.
Migration test and verification updates
tests/storage/storage_migration/test_storage_class_migration.py, tests/storage/storage_migration/utils.py
Migration tests use pluralized fixtures and verify expected file contents at every hotplug mount path.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: jpeimer, dalia-frank, vsibirsk, kgoldbla, awels

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly matches the hotplug storage migration update and mentions the conformance scope.
Description check ✅ Passed The description follows the template and includes the required sections, goals, notes, and Jira ticket URL.
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.
Stp Link Required ✅ Passed No new test files or def test_* additions were introduced; the diff only modifies existing tests, so STP/RFE/Jira traceability is not required.
Stp Scenario Coverage ✅ Passed No modified test_*.py docstring contains an STP: URL, so this PR has no STP scenarios to map or cover.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@Ahmad-Hafe Ahmad-Hafe force-pushed the feat/storage-migration-4disk-conformance branch from 092428d to d2e1228 Compare July 9, 2026 12:16
@Ahmad-Hafe Ahmad-Hafe force-pushed the feat/storage-migration-4disk-conformance branch from d2e1228 to 320889f Compare July 9, 2026 13:49
@Ahmad-Hafe Ahmad-Hafe force-pushed the feat/storage-migration-4disk-conformance branch from 320889f to 0a5e2f8 Compare July 9, 2026 13:57
@Ahmad-Hafe Ahmad-Hafe force-pushed the feat/storage-migration-4disk-conformance branch from 0a5e2f8 to 539ef14 Compare July 9, 2026 14:19
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@openshift-virtualization-qe-bot-3: The Test Execution Plan inline comment for this PR was already posted on tests/storage/storage_migration/conftest.py (Line 1) as a non-blocking COMMENT review earlier in this thread. Since there have been no new code changes since that head (only /verified was applied afterward), I'm not re-posting a duplicate plan. If new commits are pushed, please re-trigger /test-plan and I'll re-analyze against the updated diff.

Comment thread tests/storage/storage_migration/conftest.py Outdated
Comment thread tests/storage/storage_migration/conftest.py Outdated
Comment thread tests/storage/storage_migration/constants.py

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@tests/storage/storage_migration/utils.py`:
- Around line 77-95: Update verify_files_in_hotplugged_disks to inspect every
path in MOUNT_HOTPLUGGED_DEVICE_PATHS before asserting. Collect each mount’s
mismatch details while continuing the loop, then perform one final assertion
that reports all accumulated mismatches together; preserve successful
verification when no mismatches are found.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 129b2ddb-3bfc-42bb-af08-9b4d9a43a483

📥 Commits

Reviewing files that changed from the base of the PR and between a12cce3 and 2e9e6d9.

📒 Files selected for processing (4)
  • tests/storage/storage_migration/conftest.py
  • tests/storage/storage_migration/constants.py
  • tests/storage/storage_migration/test_storage_class_migration.py
  • tests/storage/storage_migration/utils.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • RedHatQE/openshift-virtualization-tests-design-docs (manual)

Comment thread tests/storage/storage_migration/utils.py Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 12, 2026
@openshift-virtualization-qe-bot

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (6b9f4af).
The following labels were preserved: lgtm-coderabbitai[bot].

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/verified

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
Do NOT submit a blocking review event (REQUEST_CHANGES/APPROVE).
Post a single inline PR comment on Files Changed (non-blocking COMMENT flow).

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file

  2. Identify affected code paths, functions, and classes

  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes

  4. Trace test dependencies through imports, shared utilities, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

Your deliverable:
Your inline informational comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)

Use these formats:

  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Real test commands (MANDATORY when changes affect session/runtime code):

When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
config hooks, session-scoped setup) or modifies runtime behavior that unit tests mock away,
you MUST include concrete pytest commands the PR author must run on a real cluster
to verify the change works end-to-end. Include:

  • A command for the error/fix path (the scenario the PR fixes)
  • A command for the happy path (regression: the normal case still works)
  • Use lightweight tests (e.g., --collect-only for startup failures,
    a single small test for runtime behavior)
    If the PR only changes test logic (not utilities/libs/conftest), the affected test
    paths themselves serve as the real test commands — no separate section needed.

Example output for a session-startup fix:

**Real tests (cluster required)**
Error path (the fix):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=nonexistent-sc --collect-only`
Expected: ValueError with clear message, not IndexError

Happy path (regression):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=<valid-sc> -k test_bar`
Expected: session starts normally

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post one non-blocking inline comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If inline comment API calls fail after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@openshift-virtualization-qe-bot-3: No new code changes have landed since the test execution plan I already posted as an inline comment on tests/storage/storage_migration/conftest.py. The intervening activity was a clean rebase (no diff) followed by /verified. Since the diff is unchanged, re-running the analysis would produce an identical plan, so I'm not posting a duplicate. Please re-trigger /test-plan once new commits with actual code changes are pushed, and I'll re-analyze against the updated diff.

Comment thread tests/storage/storage_migration/conftest.py Outdated
Comment thread tests/storage/storage_migration/conftest.py
@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30348

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30349

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (9bab0c2).

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30350

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30351

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (095b978).

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (220cfd8).

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

D/S test tox -e verify-tc-requirement-polarion failed: cnv-tests-tox-executor/30352

@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (96282a5).

@openshift-virtualization-qe-bot-6

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5569 published

@jpeimer

jpeimer commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

verify-bugs-are-open is failing and will be addressed inhttps://github.com//pull/5606

…CNV-88911)

Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (5f90452).
The following labels were preserved: lgtm-jpeimer, commented-Ahmad-Hafe.

@Ahmad-Hafe

Copy link
Copy Markdown
Contributor Author

rebased for verify-bugs-are-open is now fixed

@Ahmad-Hafe

Ahmad-Hafe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

/verified

also executed 30 times in executor runner pass rate 100%

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
Do NOT submit a blocking review event (REQUEST_CHANGES/APPROVE).
Post a single inline PR comment on Files Changed (non-blocking COMMENT flow).

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file

  2. Identify affected code paths, functions, and classes

  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes

  4. Trace test dependencies through imports, shared utilities, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

Your deliverable:
Your inline informational comment will be based on the following requirements:

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)

Use these formats:

  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Real test commands (MANDATORY when changes affect session/runtime code):

When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
config hooks, session-scoped setup) or modifies runtime behavior that unit tests mock away,
you MUST include concrete pytest commands the PR author must run on a real cluster
to verify the change works end-to-end. Include:

  • A command for the error/fix path (the scenario the PR fixes)
  • A command for the happy path (regression: the normal case still works)
  • Use lightweight tests (e.g., --collect-only for startup failures,
    a single small test for runtime behavior)
    If the PR only changes test logic (not utilities/libs/conftest), the affected test
    paths themselves serve as the real test commands — no separate section needed.

Example output for a session-startup fix:

**Real tests (cluster required)**
Error path (the fix):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=nonexistent-sc --collect-only`
Expected: ValueError with clear message, not IndexError

Happy path (regression):
`pytest tests/storage/.../test_foo.py --storage-class-matrix=<valid-sc> -k test_bar`
Expected: session starts normally

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post one non-blocking inline comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If inline comment API calls fail after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@openshift-virtualization-qe-bot-3: No new code changes have been pushed since the Test Execution Plan I already posted as an inline comment on tests/storage/storage_migration/conftest.py. The activity since then was /verified and comments about the verify-bugs-are-open check — no diff changes. Re-running the analysis now would produce an identical plan to the one already posted, so I'm not posting a duplicate.

Please re-trigger /test-plan once new commits with actual code changes land, and I'll re-analyze against the updated diff.

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.

8 participants