Add a test of a kickstart install with a bad package (#336) #523

Open
adamwill wants to merge 1 commit from kickstart-badpackage into main
Owner

As requested by anaconda team in #336, add a test of a kickstart
install that specifies a non-existent package. This should
trigger a non-fatal warning, shortly after installation starts,
which we can click through to complete the install.

Note this is broken in Fedora 43+
https://bugzilla.redhat.com/show_bug.cgi?id=2459944
so I created the needle manually from a Fedora 42 install with
the kickstart.

Signed-off-by: Adam Williamson awilliam@redhat.com

As requested by anaconda team in #336, add a test of a kickstart install that specifies a non-existent package. This should trigger a non-fatal warning, shortly after installation starts, which we can click through to complete the install. Note this is broken in Fedora 43+ https://bugzilla.redhat.com/show_bug.cgi?id=2459944 so I created the needle manually from a Fedora 42 install with the kickstart. Signed-off-by: Adam Williamson <awilliam@redhat.com>
Add a test of a kickstart install with a bad package (#336)
Some checks failed
CI via Tox and perl / tox (pull_request) Failing after 1m35s
CI via Tox and perl / perl (pull_request) Successful in 3m50s
CI via Tox and perl / checkwiki (pull_request) Failing after 35s
a0eb352b58
As requested by anaconda team in #336, add a test of a kickstart
install that specifies a non-existent package. This should
trigger a non-fatal warning, shortly after installation starts,
which we can click through to complete the install.

Note this is broken in Fedora 43+
https://bugzilla.redhat.com/show_bug.cgi?id=2459944
so I created the needle manually from a Fedora 42 install with
the kickstart.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Author
Owner

Hmm, the needle isn't 1024x768, not sure if that'll cause problems. Once there's a fix for the bug I'll see if this works...if not, I'll replace the needle.

Hmm, the needle isn't 1024x768, not sure if that'll cause problems. Once there's a fix for the bug I'll see if this works...if not, I'll replace the needle.
Author
Owner

ah, wait, this can't work...

ah, wait, this can't work...
adamwill force-pushed kickstart-badpackage from a0eb352b58
Some checks failed
CI via Tox and perl / tox (pull_request) Failing after 1m35s
CI via Tox and perl / perl (pull_request) Successful in 3m50s
CI via Tox and perl / checkwiki (pull_request) Failing after 35s
to 65b24d5382
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m29s
CI via Tox and perl / perl (pull_request) Successful in 3m32s
CI via Tox and perl / checkwiki (pull_request) Successful in 34s
AI Code Review / ai-review (pull_request_target) Successful in 40s
2026-04-21 01:27:12 +00:00
Compare
Author
Owner

Result report PR: quality/fedora_openqa#136

Result report PR: https://forge.fedoraproject.org/quality/fedora_openqa/pulls/136

AI Code Review

📋 MR Summary

Adds a test case for Kickstart installations that include a non-existent package, expecting and bypassing a non-fatal warning.

  • Key Changes:
    • Added a new Kickstart test template install_kickstart_badpackage setting the BADPACKAGE variable.
    • Introduced a needle for the bad package confirmation dialog.
    • Modified the boot process to assert and click the warning dialog if BADPACKAGE is set.
  • Impact: templates, needles, tests/_boot_to_anaconda.pm
  • Risk Level: 🟢 Low - The changes introduce a new test case and isolate the interaction to when a specific variable is set, minimizing impact on other test suites.

Detailed Code Review

The implementation correctly maps the new kickstart test requirements and appropriately guards the interaction logic with the BADPACKAGE variable. The primary issue identified is a potential race condition/timeout during the assertion of the warning dialog, which could lead to test flakiness if the installer is slow to initialize.

📂 File Reviews

📄 `tests/_boot_to_anaconda.pm` - Adds an assertion to click the bad package warning dialog before waiting for the post-install bootloader.
  • Major [Testing]: Missing explicit timeout on assert_and_click. The default timeout (typically 30 seconds) might be insufficient if Anaconda takes longer to initialize, download stage2, and parse the Kickstart file before presenting the warning. This can lead to flaky test failures.
    • Suggestion: Add an explicit, generous timeout to assert_and_click to account for variable system performance during installer startup.
assert_and_click('anaconda_install_badpackage_confirm', timeout => 300) if (get_var('BADPACKAGE'));

Summary

  • Overall Assessment: The logic is mostly sound, but a missing timeout on the UI interaction poses a risk of flaky test executions.
  • Priority Issues:
    • Add an explicit timeout to the assert_and_click call in _boot_to_anaconda.pm to prevent race conditions during installer startup.

🤖 AI Code Review | Generated with ai-code-review | Model: gemini-3.1-pro-preview

⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.

## AI Code Review ### 📋 MR Summary Adds a test case for Kickstart installations that include a non-existent package, expecting and bypassing a non-fatal warning. - **Key Changes:** - Added a new Kickstart test template `install_kickstart_badpackage` setting the `BADPACKAGE` variable. - Introduced a needle for the bad package confirmation dialog. - Modified the boot process to assert and click the warning dialog if `BADPACKAGE` is set. - **Impact:** templates, needles, tests/_boot_to_anaconda.pm - **Risk Level:** 🟢 Low - The changes introduce a new test case and isolate the interaction to when a specific variable is set, minimizing impact on other test suites. ### Detailed Code Review The implementation correctly maps the new kickstart test requirements and appropriately guards the interaction logic with the `BADPACKAGE` variable. The primary issue identified is a potential race condition/timeout during the assertion of the warning dialog, which could lead to test flakiness if the installer is slow to initialize. #### 📂 File Reviews <details> <summary><strong>📄 `tests/_boot_to_anaconda.pm`</strong> - Adds an assertion to click the bad package warning dialog before waiting for the post-install bootloader.</summary> - **Major** [Testing]: Missing explicit timeout on `assert_and_click`. The default timeout (typically 30 seconds) might be insufficient if Anaconda takes longer to initialize, download stage2, and parse the Kickstart file before presenting the warning. This can lead to flaky test failures. - *Suggestion:* Add an explicit, generous timeout to `assert_and_click` to account for variable system performance during installer startup. ```` assert_and_click('anaconda_install_badpackage_confirm', timeout => 300) if (get_var('BADPACKAGE')); ```` </details> ### ✅ Summary - **Overall Assessment:** The logic is mostly sound, but a missing timeout on the UI interaction poses a risk of flaky test executions. - **Priority Issues:** - Add an explicit timeout to the `assert_and_click` call in `_boot_to_anaconda.pm` to prevent race conditions during installer startup. --- 🤖 **AI Code Review** | Generated with [ai-code-review](https://gitlab.com/redhat/edge/ci-cd/ai-code-review) | **Model:** `gemini-3.1-pro-preview` ⚠️ *AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.*
Author
Owner

Yeah, true. Fixing.

Yeah, true. Fixing.
adamwill force-pushed kickstart-badpackage from 65b24d5382
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m29s
CI via Tox and perl / perl (pull_request) Successful in 3m32s
CI via Tox and perl / checkwiki (pull_request) Successful in 34s
AI Code Review / ai-review (pull_request_target) Successful in 40s
to 67fcd650fd
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m27s
CI via Tox and perl / perl (pull_request) Successful in 3m32s
CI via Tox and perl / checkwiki (pull_request) Successful in 35s
2026-04-21 01:46:06 +00:00
Compare
Author
Owner

Kinda blocked by https://bugzilla.redhat.com/show_bug.cgi?id=2459944 . I'd prefer the bug to be fixed before we merge the test, so we can check the test all the way, and update the needle if necessary.

Kinda blocked by https://bugzilla.redhat.com/show_bug.cgi?id=2459944 . I'd prefer the bug to be fixed before we merge the test, so we can check the test all the way, and update the needle if necessary.
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m27s
CI via Tox and perl / perl (pull_request) Successful in 3m32s
CI via Tox and perl / checkwiki (pull_request) Successful in 35s
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin kickstart-badpackage:kickstart-badpackage
git switch kickstart-badpackage

Merge

Merge the changes and update on Forgejo.
git switch main
git merge --no-ff kickstart-badpackage
git switch kickstart-badpackage
git rebase main
git switch main
git merge --ff-only kickstart-badpackage
git switch kickstart-badpackage
git rebase main
git switch main
git merge --no-ff kickstart-badpackage
git switch main
git merge --squash kickstart-badpackage
git switch main
git merge --ff-only kickstart-badpackage
git switch main
git merge kickstart-badpackage
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quality/os-autoinst-distri-fedora!523
No description provided.