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);
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.
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
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>