Create test suite for Fedora Media Writer #462

Merged
adamwill merged 16 commits from newtest/fedora-media-writer into main 2026-06-08 04:02:55 +00:00

16 commits

Author SHA1 Message Date
604c736b9b Fix the call of authenticate function
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 4m42s
CI via Tox and perl / perl (pull_request) Successful in 3m33s
AI Code Review / ai-review (pull_request_target) Has been skipped
AI Code Review / remove-label (pull_request_target) Successful in 2s
2026-01-28 16:52:37 +01:00
88f25c639a Fix mwriter.pm as told by AI overlord
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 3m39s
CI via Tox and perl / perl (pull_request) Successful in 3m28s
2026-01-28 16:29:22 +01:00
fb8dc856fb Fix the issues reported by AI overlord
Some checks failed
CI via Tox and perl / tox (pull_request) Successful in 4m24s
CI via Tox and perl / perl (pull_request) Has been cancelled
2026-01-28 16:23:33 +01:00
bcd474d7f6 Use Adam's way to handle containers
Some checks failed
CI via Tox and perl / tox (pull_request) Successful in 3m56s
CI via Tox and perl / perl (pull_request) Failing after 31s
2026-01-28 12:50:55 +01:00
a5b3166873 Move specific subroutines back into the test script
Some checks failed
CI via Tox and perl / tox (pull_request) Successful in 3m43s
CI via Tox and perl / perl (pull_request) Failing after 31s
Some subroutines are only used once, so there is no need to
have them in a library. This moves them back into the code.
2026-01-28 12:24:55 +01:00
e19cff13b8 Move the authenticate subroutine to utils.pm
Some checks failed
CI via Tox and perl / tox (pull_request) Successful in 4m43s
CI via Tox and perl / perl (pull_request) Has been cancelled
Also, the subroutine now uses arguments to set some parametres.
First, you need to provide a password to authenticate - previously
it was hardwired and could not handle differences between root and
user passwords.
By default, it waits 15 seconds to see the auth dialogue and 5
seconds after the authentication. You can set these times.
Example: authenticate($password, timeout => 20, stillscreen => 10);
2026-01-28 12:13:54 +01:00
e8f1023702 Change -drive to -blockdev
Some checks failed
CI via Tox and perl / tox (pull_request) Successful in 1m39s
CI via Tox and perl / perl (pull_request) Successful in 3m29s
AI Code Review / ai-review (pull_request_target) Successful in 1m10s
AI Code Review / remove-label (pull_request_target) Failing after 31s
2026-01-26 12:29:07 -08:00
ff28ca0a0c Fix the locking mechanism and add tests as requested
Improve Fedora Media Writer tests by validating written USB media
against the original ISO and by making the workflow work reliably
across classic and Silverblue variants.

The previous post-write verification relied on mounting the USB partitions
and checking for a handful of expected directory structures. This is replaced
with a stronger end-to-end check that verifies the embedded checksum on the
target device and then compares the raw device contents byte-for-byte
with the downloaded ISO, treating the expected cmp “EOF” condition as success.

To support Silverblue, where the required isomd5sum package is not installed
by default, a generic toolbox helper is introduced in utils.pm to create a toolbox,
install required packages inside it, and run the necessary command there.

The media writer test template is updated to explicitly model the USB target
as /dev/sda by enforcing a single-disk setup and adjusting that QEMU uses
a snapshot to create the device and thus not create a file lock on it to
prevent other tests from running.
2026-01-26 12:29:07 -08:00
6bbbd1c076 Create test suite for Fedora Media Writer
This PR adds the test suite for Fedora Media Writer, which is
an application to download and copy the installation media files
to the a USB disk which can be then used for installation.
So far, we have been testing this application with manual testing,
this is an attempt to automate it. It tests the following:

* It chooses the Workstation media, downloads it, saves it locally
  and writes it to the USB disk. It also checks that the usual
  content exists on the USB disk.
* It opens the previously downloaded ISO and writes it to the USB disk.
  Then it check that the usual content exists on the USB disk.
* Removes the installation from the USB disk and restores it to its
  original state.
* This does not test any hotplugging mechanisms yet.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/450

Fix after review
2026-01-26 12:29:07 -08:00
f17fdaa0f3 Update a few GNOME app needles for Rawhide changes
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-26 12:27:55 -08:00
3db4669a33 Update multiple KDE needles for misc changes in Rawhide
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-26 12:27:30 -08:00
43f287ce0b _graphical_wait_login: really expect a *graphical* login screen
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m35s
CI via Tox and perl / perl (pull_request) Successful in 3m23s
https://openqa.fedoraproject.org/tests/4180975 failed because
_graphical_wait_login matched text_console_login while it was
still visible before the VM rebooted. Let's tweak things so
_graphical_wait_login really only looks for a *graphical* login
screen. We already have the tags, only need to tweak the logic.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-23 22:55:08 -08:00
4b143a543f Add Cockpit scratch build to work around https://github.com/cockpit-project/cockpit/pull/22800
Since https://bodhi.fedoraproject.org/updates/FEDORA-2026-602099e92f
landed, cockpit autoupdate test is failing on all updates. This
build fixes it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-23 18:22:39 -08:00
ae7655097e Drop stable workarounds, drop 41 from workarounds hash
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-23 18:22:04 -08:00
3a0eeb8eba Convert CI to Forgejo, add AI PR review
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m38s
CI via Tox and perl / perl (pull_request) Successful in 3m39s
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-23 13:48:49 -08:00
873b8e9078 Update pagure.io links to forge.fedoraproject.org
Not all of them, because not every referenced project has moved
yet.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-01-23 13:35:50 -08:00