We use variables to track test state across modules, sometimes.
As this is all internal to the test logic I didn't bother always
making these variables upper-case, but os-autoinst now treats
lower-case variables as a fatal error, so we have to change.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This issue appeared when we started testing Rawhide updates, but
I only noticed it today. When testing Rawhide updates after
Branch point, the upgrade tests upgrade from Branched to Rawhide.
On Branched, updates-testing is enabled by default. We only
disable it when we reach `upgrade_run`, but by that point we've
already done a `dnf -y update` in `upgrade_preinstall` and
potentially installed other packages in steps between
`upgrade_preinstall` and `upgrade_run`. That can cause problems,
like today all FreeIPA upgrade tests on Rawhide are failing
because there's a newer freeipa in updates-testing for F37 than
is in the current Rawhide compose.
Solve this by disabling updates-testing before we do the update
in `upgrade_preinstall`. To avoid excessive code duplication,
factor out the repo disabling code.
We'll do this twice on upgrade tests now, but it shouldn't be a
problem.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
samba-client-libs with an soname bump made today's Rawhide, a
freeipa rebuilt against it did not, so we need this in overrides
or all FreeIPA tests fail on all Rawhide updates.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Editing the files under /ostree/deploy doesn't work on Rawhide
any more because it's been made read-only. Thanks to Timothée
Ravier for pointing out this way of doing it, which is better
anyway and avoids awful quotation issues in the code.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
A samba update was pushed for F37 without rebuilds of sssd and
freeipa (which needed to be rebuilt against it). Tests of any
of those updates on its own will fail, so including them all as
workarounds so the tests for each should work. I'll make sure
they all get pushed stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The file conflict between older webkit2gtk4.1-jsc and new
javascriptcoregtk4.1 is causing all Workstation update tests to
fail on all Rawhide updates. This new version of webkitgtk adds
obsoletes to javascriptcoregtk4.1 which we hope should fix it.
Adding the x86_64 build directly as other arches aren't done
yet, and we only run the Workstation update tests on x86_64
anyway.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
openQA choked badly on
https://bodhi.fedoraproject.org/updates/FEDORA-2022-6256981a71
because it's, well, huge - 87 builds including texlive, which
has hundreds (thousands?) of subpackages. This exposed several
frailties against such updates.
First of all, we set NUMDISKS to at least 2 for *all* update
tests, which should mean they all stash the RPMs from the update
on a non-system disk and avoid problems with space exhaustion.
After that, just extend a few timeouts in particularly fragile
places, including one which is specific to texlive (as I don't
know of any other source package with so many subpackages).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
F35 to F36 FreeIPA server upgrade test is failing because the
latest F36 package is lower-versioned than the latest F35
package, and FreeIPA's upgrade scripts are written to fail if
this is the case. The update bumps the F36 NVR to be higher
than the F35 one.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
bodhi-client should depend on it, but technically since we have
code that calls `koji` directly here, we should probably also
include it in our install anyway, so not marking this as a
workaround.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR changes the way to download the test data into the VM.
Although it does not use a disk image as suggested in one
of the review, it does not clone the entire repository, but
a simple tar.gz file that holds the data which will be
distributed into the directory structure.
This way, the amount of data needed to be downloaded dropped
from approximately 50MB to below 2MB.
Also, the existing test suites were adapted to this situation.
Now we've ditched syslinux in Rawhide, we should just always
expect to see grub if release number is > 36.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It seems when we quit Firefox back to a VT on ppc64le, the system
hangs. Not sure why, but we can deal with it by rebooting the
system and logging back in as root if it happens. Also take the
opportunity to clean up the flow of quit_firefox so we always
check that we get back to a console then wait 5 seconds for the
console to settle, so all the tests that call it can stop doing
that.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
After typing the username, on some Rawhide tests, it's taking
over 30 seconds for the password prompt to appear. This isn't
ideal but we don't want the test to fail on this. Give it up
to 45 seconds.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Wow, so the real way to do config overrides is, uh...obscure.
One file pointing to another file, both with mandatory comment
lines and one with a weird required value. Wat. Anyway, this
works in a VM. I still don't know why the policy for the first
run page isn't working as advertised.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The new way isn't working, so put the old way back but change it
to use user_pref instead of pref to see if that helps, and upload
the files for checking.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Thanks to Mike Kaply in
https://bugzilla.mozilla.org/show_bug.cgi?id=1703903#c18 , this
should avoid Quick Suggest onboarding, "Total Cookie Protection"
onboarding, and future annoying things using the same mechanisms
without using the prefs mechanism or going after each one case
by case.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I meant to include this in the earlier commit that does the same
for type_very_safely, but forgot.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I noticed today that we're timing out all the time on these
wait_still_screens in gnome-terminal, because it uses a big
flashing cursor and the similarity between "cursor there" and
"cursor not there" is less than 45 or 42 (it seems to be 38.x).
So let's drop these levels to 38, hopefully that's not too low.
There are probably more places where this is an issue, I'll
change them as I notice them.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We can't use the default similarity_level for wait_still_screen
when there's a flashing cursor - flashing cursor will always
cause the similarity level to be too low and the wait will just
time out at 30 seconds. Cut it to 42.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
check_desktop tries to catch when the overview is open and close
it. But with GNOME 42, it seems the inactive "Activities" button
is shown briefly on login before GNOME opens the overview. If
check_desktop catches that, it will think the overview isn't
open and it doesn't need to do anything. So if we match on first
cycle through the loop, let's wait_still_screen then match again.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
So these kind of things go through perl *and* bash string
interpretation and the escaping can get pretty wacky. Turns out
we need *eight* slashes here to get four through to bash (which
we need to deal with *sed*'s escaping rules), and it only works
in single quotes for some reason, not double quotes.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a bug in rpm where doing `rpm -q [NVRA]` doesn't work
if the NVRA contains a caret. To make it work you have to add
a literal slash character before the caret character, so we add
a sed command to do that, when we're checking whether packages
from the update actually got installed.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Scratch build because we don't have a single-build update with
the fix, it's likely gonna be included in the 5.24.2 megaupdate.
I don't want to use that whole thing as a workaround, so I did
a 5.24.1 scratch build with the fix instead.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The intent is that if the ps check finds nothing we'll use the
loginctl output, but that doesn't work because script_output
doesn't return the output if the script fails. There's an arg
you can pass to make it do so, but let's just make it always
succeed instead, by adding a ||: to the second grep like we have
for the first.
Also, I noticed this problem because the ps check started not
working on F36 KDE because none of the processes we check for
are shown as running on a tty, so let's add one more that *is*
shown as running on a tty...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Tests that use Firefox started failing recently because Firefox
grew yet another stupid pop-up thing that *might* show on start
up, this appears to be trying to get you to sign up for a
feature called "quick suggest". After half an hour trawling the
relevant code, this is my best guess as to how to turn it off.
Don't know for sure if it works because the thing doesn't pop
up every time, but it at least doesn't make things worse.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
KDE tests are failing on all F34 updates ATM due to
https://bugzilla.redhat.com/show_bug.cgi?id=2049560 , add the
update to fix it. Also drop 33 from the workarounds hash as it's
EOL.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR adds implementations of distribution methods to make them
usable on Fedora. It adds the following methods
* ensure_installed (to install packages)
* become_root (to switch to root account)
* script_sudo (run script with sudo)
* assert_script_sudo (run and assert a sudo script)
It also adds a helper script to the utils.pm
* make_serial_writable
that makes the serial console writable for normal users
and so enables to run commands that check their progress
by sending messages to the serial console. Normally, they
fail, because the messages will not be written their, so
the checking mechanism will never see them.
As of today's Rawhide compose, user accounts added in Rawhide
have admin privs by default. For now we need to handle both
possibilities here (click the box if it's not clicked already);
after F35 EOL we can just drop all handling of that box.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Rawhide had a failure today where the dropdowns moved between
us matching and clicking, so we clicked the wrong one:
https://openqa.fedoraproject.org/tests/1005662
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This fails sometimes just because we're too early, or something.
Also with GNOME Shell 41rc, alt-f1 no longer works to open and
close the overview. super *does* seem to work in KDE these days,
so let's switch from alt-f1 to super everywhere.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a bug in current F35/Rawhide which causes the GOA screen
in g-i-s not to show up. Since failing on that will block a lot
of testing, let's handle it as a soft failure.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Remove a whole chunk of needles that haven't matched for more
than 3 months. Also move a few needles to appropriate locations,
simplify some code chunks that relied on removed needles (if
we're not matching the needles, we don't need those chunks any
more), and drop some other no-longer-needed conditionals for
older releases.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We can match on apps_menu_button_active before the overview has
totally loaded in, and it seems the alt-f1 press can be dropped
in that case. Add a wait_still_screen to try and avoid that.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This adds a test for fingerprint-based login, as requested by
@benzea in #223. We use the fprintd dummy device to let us
simulate scanning a fingerprint, and check various scenarios
recommended by @benzea.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This systemd update went stable ages ago. But now we need to add
a jpegxl update as a workaround to avoid KDE live build tests
failing on the problematic aom->jpegxl-libs->gimp dependency
chain I identified yesterday. It makes KDE live builds pull in
too many packages and fail because they run out of space.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Make the 'deactivate overview if it's active' thing a bit more
robust by asserting the inactive state after deactivating it,
and add new needles for the new RC (text got a bit brighter).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Drop Firefox and NSS updates which have been stable for a while,
update the systemd one to the latest which should hopefully
finally workaround the DNS issues.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This reverts commit e23df39ee1,
putting the systemd workaround back in place, now we know how to
avoid the bug it causes. It's going stable tomorrow anyway, but
I want to re-run failed tests with the fix right away. Used the
update ID this time, not the build number.
This will avoid us hitting a crash in systemd during update when
systemd is being updated. That's a real bug and it's good that
it's been caught, but we don't want unrelated updates to fail on
this just because systemd is in the update set.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It's causing crashes on update. I tried making us do an offline
update in repo_setup, not online, but that's actually quite hard
to implement so I'm not gonna do it on a Friday night. We'll
just live with unreliable _live_build for a bit longer.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
For consistency, let's just return to the desktop right away. We
also need to handle closing the overview before running installer
on live image boot.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
When we right-click then left-click, we should move away from
the menu to avoid actually clicking anything in it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It's gone stable, but we haven't had a compose yet. Adding it as
a workaround so I can just revert the workaround for the bug
(see previous commit).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
desktop_browser fails frequently on F34 KDE due to #1927972. The
new version should avoid that problem, adding it as a workaround
to hopefully make the test more reliable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Add FEDORA-2021-263244c071 as a workaround to fix FreeIPA tests
on F34. Drop current 32 and 33 workarounds as they're all stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In GNOME 40, the new-user mode of g-i-s is gone and we get the
welcome tour where we would previously have seen that. This
should handle that, I hope. I probably messed up somewhere.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
These two are for a couple of FreeIPA bugs that showed up today
and were worked out with pemensik and mreynolds.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a race issue with just treating it as a next button: it's
not in the same place as a next button. Sometimes in the g-i-s
code we actually get ahead of ourselves and click early, which
isn't really a problem when the buttons are all in the same
place, but if we click "Start Setup" in the middle of transition
to the Privacy screen - as in
https://openqa.fedoraproject.org/tests/745034#step/_graphical_wait_login/4
- the click effectively gets lost. So let's make it its own tag
and have the initial assert look for it too. That way we won't
match on it again in the main loop over "@nexts".
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This sets us up to test the release-blocking aarch64 disk images
(Minimal, Server and Workstation). It also allows for testing
armhfp disk images on aarch64 worker hosts (though my testing of
that isn't going too well so far), and fixes the initial-setup
handling for a change upstream ('use password' is now the default
so we don't need to choose it). We rewire disk image deployment
test loading to work through the generic loader code rather than
using ENTRYPOINT, as it allows us to more gracefully handle
graphical (Workstation) vs. console (Server, Minimal), moving
the code for handling console initial-setup to a helper function
just like the code for gnome-initial-setup and having _console_
wait_login call it when appropriate. We also tweak desktop_vt a
bit because now we need to switch from a console running as test
to a desktop, which breaks the assumption that the highest
numbered session of user test is the desktop...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
FreeIPA upgrade test is failing because of
https://bugzilla.redhat.com/show_bug.cgi?id=1886205. The test
failing every time is not useful as we know what the issue is,
so add the update as a workaround to avoid it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Add FEDORA-2020-27f80050a2 as a workaround because without it the
KDE desktop background test fails due to the bug in -6.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We were using it to checkout a git version of python-fedora to
work around a bug, long ago, but we don't do that any more so
we don't need it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
openQA sometimes winds up testing an update that doesn't have
any packages for x86_64 (or aarch64). The most common case is
s390utils, which is on the critpath but only has packages for
s390x. I would ideally like to skip scheduling entirely if the
update has no packages for the arch we're scheduling on, but
sadly that involves using the Koji API which is XML-RPC and I
don't really want to deal with that again. This deals with it
at the test level instead, by checking the error message if
`koji download-build` fails and carrying on if it's the "no
packages for this arch" error. That means if the update has no
packages at all for our arch we're not really testing anything,
but that's better than a bunch of false failures, I guess.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Kernel updates for F31 and F32 went stable so they can come out.
mock 2.6 fixes the bug that occurs when /etc/resolv.conf is a
dangling symlink - this breaks the live_build test.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Kernel 5.8.8 broke the installer by changing return codes for
partition operations, these updates are listed as fixing it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The F32 FreeIPA update that changed the web UI has gone stable
now, so remove it. A pki-core update has just come out that fixes
F32 -> F33 FreeIPA server upgrade test: add this as a workaround
for F33 so that test stops failing on every update.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Previously we were relying on `rpm -q` always outputting the
right package last. We saw some test failures on recent kernel
updates, e.g. https://openqa.fedoraproject.org/tests/658768 ,
which indicate this isn't always the case; there the 'right'
package was second of three for kernel, third of three for
kernel-core and first of three for kernel-modules. So we need to
make it more robust. This uses an additional call:
`rpm -q $pkg --last | head -1` to find the most recent package,
if there are more than one; this should always be the right one,
I hope. Note we cannot just add `--last` to the `rpm -q --qf...`
call because the output when you do that is weird; you get the
output you'd get if you just called `rpm -q --last` first, and
*then* the query-formatted output afterwards (though with the
modified order as expected). There doesn't seem to be any way to
get only the latter.
I also tweaked the log uploading so we always upload the working
logs even when the test passes; it can't hurt anything and it is
sometimes useful to have them.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The FreeIPA UI change that the previous commit adapted to is in
4.8.9. That's stable for Rawhide and F33 already, but still in
testing for F32, and won't go to F31. So we need to make the
change conditional on release number, and we also add the update
to workarounds for F32 so we don't have to do something awkward
while we wait for it to go stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In g-i-s 3.37.91, the first screen has a 'Start Setup' button
rather than a 'Next' button. Easiest thing for us to do here is
just to add a new needle which has the 'next_button' tag even
though it's clearly not a 'Next' button, because then the code
still works :) So do that, but give the file a suggestive name
and explain the situation in a code comment.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It's failing about one in six tries currently, with Bodhi 5.5 on
the server end: https://github.com/fedora-infra/bodhi/issues/4105
this should work around that.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The ones that were in there are stable now, plus downloading them
is hitting a bug in Bodhi and breaking tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This is a bit complex to automate, because we cannot really use
the production Zezere server (provision.fedoraproject.org) as
the test case shows, as we'd have to solve authentication and
we also don't really want to constantly keep registering new
hosts to it that are going to disappear and never be seen again.
So, instead we'll do it by setting up our *own* Zezere, and
provisioning our IoT system in that. We run two tests. The
'ignition' test is the actual IoT 'device'; all it really does
is boot up, sit around, and wait to be provisioned. The 'server'
test first sets up a Zezere server, then logs into it, adds an
ssh key, claims the IoT device, provisions it, and connects to
it to create a special file which tells the 'ignition' test
everything worked and it can close out.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The annoying submenus in the overview app list now scroll right
not down :/ have to adapt this function for that. Had to move
get_release_number earlier because perl ordering.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See https://pagure.io/background-logo-extension/issue/26 - in
current Rawhide, the search box in the overview is not active
when the overview is opened, so you can't just open the
overview and type, you have to click it first.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This should avoid the bug happening in upgrade tests (I already
built the fix into the base disk image, which should avoid it
happening in other tests).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2878 .
GNOME 3.37.2 seems to have a bug with submenus in the app menu;
the first time you open one you can't scroll through it using
the keyboard. On every open after the first it works fine. This
is a quick and dirty workaround - when we're dealing with a
submenu, open it then close it then open it again.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I started out trying to fix os-release for the recent change to
add "Prerelease" tags to the VERSION and PRETTY_NAME fields, then
things spiralled. It got me thinking about the awkward DEVELOPMENT
variable we use, so I decided to get rid of it and refactor the
few things that use it. I refactored the anaconda prerelease tag
check, and wrote a new giant comment that gives details about
exactly how anaconda decides whether to show those tags, to give
context to our choices about when to expect them. This check now
uses a new LABEL variable the scheduler now sets. I also wound up
creating new UP1REL and UP2REL vars to define the 'source' release
for upgrade tests, separate from CURRREL and PREVREL, which are
now never lies - they really are the current stable and previous
stable release, even for update upgrade tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The old code waited after launching the terminal, the new code
doesn't, which led to a 'g' being swallowed in the first command
in https://openqa.fedoraproject.org/tests/592759 .
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
FreeIPA F31 -> F32 upgrade test is currently failing because
a new pki-core hit F31 stable but not F32 stable yet. It can't go
backwards on upgrade, that breaks stuff. The F32 update has been
pushed stable but just hasn't made mirrors yet as the last F32
nightly compose failed, so let's add it to the workarounds for
now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Except one that's pushed stable but hasn't made repos yet (as the
last F32 nightly compose failed).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This is pending stable, but looks like the update push won't
happen for a few hours, so I'm adding it as a workaround so we
can re-run the tests and get them to pass.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Otherwise the new cockpit main screen needle match fails, because
'machine' is not on the top part of the screen.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This block is kinda weird, but I don't want to fiddle with it
any more right now. I don't know why we do this check_screen
exactly like this.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
...because it comes out as 'cleqr'. Note, this may be fragile if
we start doing more stuff post-install, but for now I think it's
safe, I don't *think* we should ever hit this after running
`loadkeys us`.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It seems like the situation where we need to pull an update from
updates-testing into all update tests to work around some known
issue is going to keep happening. So instead of constantly
adding and then entirely removing bespoke lines for each specific
workaround, let's have a permanent mechanism for doing this: a
hash with release numbers as keys, and arrayrefs of update IDs
as values, and a block to call `bodhi updates download` on the
appropriate array for the release under test. This way, to add
or remove a workaround you just update the hash. If we're at a
point where *no* workarounds are needed the %workarounds hash
can be made entirely empty (it must exist, though) and the code
will be a clean no-op.
The actual workaround here pulls in Lmod updates I just sent out
to work around this issue in one of the KDE update tests:
https://openqa.fedoraproject.org/tests/497160#step/base_update_cli/11
there's some code in Lmod that gets sourced in bash profiles
which breaks openQA's `validate_script_output` by blurping two
lines of informational output into the output of the script.
The update backports a change from upstream Lmod master that
sends that informational output to stderr instead of stdout.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The jss updates all went stable already. Now we have a problem
with SELinux, upower and container-selinux (we need a newer
selinux-policy to avoid upower failures in the services_start
test, but the first attempt to fix it caused the desktop_updates
test to start failing because container-selinux needed adapting
to changes in selinux-policy...let's just pull in the updates
with the latest versions of both to be safe), and one with NSS
that causes Firefox to give false certificate errors sometimes
(this is particularly affecting the FreeIPA browser test). As
usual these should be dropped once the updates go stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
On Rawhide Cloud_Base boots, there's some SSH key and network
information printed above the 'login:' prompt, so we can't
expect empty space there. Also tweak console_login() to clear
the screen after logging in, so the login prompt is cleared and
doesn't confuse things on subsequent runs (like it did first
time we tried this). And add a new user logged in needle, as it
seems after we clear the screen the tilde appears in a slightly
different position and the existing needle doesn't match.
https://openqa.fedoraproject.org/tests/489003#step/_console_wait_login/7
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This adds a test for QA:Testcase_Anaconda_User_Interface_VNC -
the VNC install test case. It's implemented as a server/client
pair, with the server booting from the Server DVD image with
`inst.vnc` and the client booting from the desktop base disk
image, setting up networking, then running Boxes to connect to
the server and run the install.
There are various little tweaks to test loading and logic to
handle this, mostly pretty clear. We also move the workaround
for 'spurious auth prompt appears on desktop after you switch
away to a VT and back' out of the desktop update test and into
the `desktop_vt` helper function, since now this test can hit
it as well. We enhance _graphical_wait_login to handle the boot
loader if needed (it has never needed to until now).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This handles a case where KDE shows a notification saying
'PIM Maintenance (Finished)', like this:
https://openqa.fedoraproject.org/tests/477345#step/desktop_notifications/34
we need to click it away for the desktop_notification test to
pass. It also clarifies the difference between this notification
and the eternal 'akonadi_migration_agent is doing something'
popup in the needle names and comments. It also replaces the
'check_screen then assert_and_click if found' pattern in several
notifications-related places with the better 'check_screen then
click_lastmatch if found' pattern now available upstream.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR adds the following:
* moves out the presetting procedures, so that two long terminal tests do not have
to run twice
* add methods for application to register when successfully started
* adds a test that checks if all required applications have registered
* server-cockpit-updates tests that Cockpit can be used to update the system.
* server-cockpit-autoupdate tests that users can use dnf-automatic for system
updates.
* cockpit functions were removed from utils.pm and put into an extra library
for cockpit - cockpit.pm which all cockpit tests are now using.
Review cockpit.pm
Review autoupdate test.
Review the update test.
Fix typo in cockpit.pm
Add sleep.
Add missing command.
Delete an unused needle.
This goes with a corresponding fedora_openqa commit that passes
ADVISORY_NVRS when scheduling update jobs. This is to address
https://pagure.io/fedora-qa/fedora_openqa/issue/78 so we can
publish spec-compliant and correct CI Messages: we will decide
what NVRs are in the update at scheduling time and always get
and test those NVRs, rather than the test downloading whatever
is in the update when it is run.
Some consequences: manual restarting or cloning of an update
test scheduled before this change lands will result in failure;
to do this you'll have to add the ADVISORY_NVRS value manually
with clone_job.pl, or simply reschedule the update with
fedora-openqa.
Manual restarting or cloning of an update test scheduled with
this change will always test the same NVRs. If the update has
changed and you want to re-test with the new packages in the
update, you must change ADVISORY_NVRS manually with clone_job,
or reschedule with fedora-openqa.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
reported in autoinst-log.txt
===
"my" variable $files masks earlier declaration in same scope at /var/lib/openqa/share/tests/fedora/lib/utils.pm line 352.
"my" variable $beta masks earlier declaration in same scope at /var/lib/openqa/share/tests/fedora/lib/utils.pm line 995.
===
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
We need another needle for French installs, and we need to use
ISO_URL for checking the ISO file name if ISO isn't set.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
On F31 update tests, desktop_vt is broken because the 'ps -C'
command is showing 'tty?' as the tty on which Xwayland/Xorg is
running. Let's try using loginctl as a workaround for this.
This ordering of commands should ensure the ps -C output takes
precedence when it's correct.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
A couple of tests failed in F31/Rawhide lately because quitting
Firefox (running on a bare X server) took more than 10 seconds
to get back to a console...not sure why, but it's not something
we ought to waste a lot of time on, let's just bump the timeout.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We do this in quite a few places and need to do it in another,
so let's just have a function for it. It takes a file glob
so we can have it run on a different one for _live_build.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There are some situations in which ISO_URL is not set (e.g. a
manual POST to re-run tests after download has been done). If
there is no ISO_URL just skip the checksum check here.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
A broken lorax got into F29 stable and is causing live image
builds to fail in all F29 update tests. Work around that by
downloading a newer fixed package in _repo_setup_updates.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Current tests sometimes seem to fail because X takes quite a
while to come up for some reason. I can't figure out why, and
this isn't properly a failure of the test (starting the X server
is an implementation detail), so let's just wait a bit longer
for now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There are three places where we basically want to click away
pop-up update notifications and the buggy akonadi_migration_agent
notification if it's there, in KDE tests. Let's share this code
between them, and also let's record soft failures for the buggy
cases in the desktop_notifications test.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
* Add test to check module defaults.
* Add whitelist download.
* Fix install test to include selected profile to be on the safe side.
* Add test into templates.
type_very_safely commonly gets stuck waiting on a still screen
at the end because when you're typing, there's often a flashing
cursor, and the default similarity for wait_still_screen is 47
which is tight enough that a flashing cursor usually fails it.
So back it off to 45.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're not downloading all the packages from updates that contain
more than one builds ATM, which makes the test invalid and has
caused some false fails (and may even have caused false passes,
though I can't tell yet). Install a fixed Bodhi as a workaround
for this.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
So, turns out new os-autoinst does *not* still accept the old
argument style for assert_and_click...and old os-autoinst
doesn't accept the new one. This adds a wrapper that handles
both, so our tests can work with old and new os-autoinst. We can
drop this once both deployments are on newer os-autoinst.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In the new os-autoinst I just sent to staging, the old style
doesn't work any more, breaks all tests. This style should also
work with the older os-autoinst on stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
'use password' now seems to be default when creating a user in
text mode, so we need to handle that.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
A BIND update broke a test, then went stable, so it's failing on
all updates right now. This subsequent update fixes the bug, so
let's pull it in here until it's pushed stable.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Because we use check_screen not assert_screen here, the match
can actually fail, but the match_has_tag conditional can pass
on the *previous* match, if that happened to also be matching
on a console tag. We don't want that. Let's just make these
into assert_screens to avoid it; I don't think there's any path
where we're actually expecting this to work if those
check_screens didn't match.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Add png files as a background for the needles.
Rewrite the test handling methods to make them ready for KDE
Add the ABRT startstop test.
Make changes and corrections to the abrt test.
Add test for Firewall.
Add test for DNF dragora.
Add wait time for dnfdragora test.
Correct syntax.
Add Language test.
Make some changes to the DNF dragora test.
Add Users test case.
Add needles for DBUS viewer test.
Add Dbusviewer test.
Add Mahjong test and needles for games.
Add Minesweeper tests.
Add Patience test.
Add test for Document Viewer.
add test for gwenview
Add test for koulourpaint.
Add test for Kruler
Add test for Kcolorchooser
Reneedle failing needle.
Add ktorrent tests.
Add tests for CPT editors.
Add test for Krfb
Fix names for those files.
Add test for Kget
Add Akregator test.
Add test for Konversation.
Make Konversation end really.
Add tests for Kmail
Add test for PIM exporter.
Add test for KTnef and Krdc.
Fix problems after test runs.
Make more tries.
Fix needle to be found better.
Fix more errors.
Add test for Falkon.
Add tests for browsers.
Add support for closing tabs into Firefox test.
Add tests for K3B
move needles to correct directory
Add Kaddressbook test.
Add Kontakt text.
Add test for korganizer.
Add menu office needle and correct konqueror needle.
Add test for calligra stage.
Add test for Calligra.
Add test for network connections.
Modify needle for kaddressbook to prevent failing.
Add test for system settings and fix others.
Add test for FMW.
Add test for Dolphin
Add test for Infocenter.
Add test for kparted.
Fix a wrong needle.
Test relnotes.
Fix some errors in tests.
Add test for Discover.
Add test for Ksysguard.
Add tests for Konsole.
Add tests for KDE wallet.
Add tests for several utilities.
Add Krusader test.
Finish utility tests.
Fix some errors.
Fix needle for spectacle.
Add wait time to let Dragora wait for network.
This tweaks the update live and installer image build tests to
store the update repo on a separate disk. This should hopefully
avoid the tests failing due to insufficient disk space when the
update is huge (e.g. KDE or GNOME megaupdates).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The initial implementation here has a problem if we spot the
'successful' screen briefly, then the system reboots normally,
reaches the bootloader and proceeds past it all within 10
seconds; in this case we'll never actually spot the bootloader
and do our stuff. This tweak should continue through the code
block immediately if the bootloader shows up during the ten
seconds, otherwise check again for the 'successful' screen and
reboot.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The f30 tag is currently a lot fresher than what's in the repos,
because we haven't had a compose for five days. This causes
problems in some F30 update tests because the update works fine
with what's in the `f30` tag but not what's on the mirrors. To
deal with this until we get a successful compose, let's just
enable the f30-build repo in the update test process...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We want to get accurate results from the rest of the upgrade
test and we know about this bug, so let's make it a soft fail
so we can see how the test is functioning otherwise.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
I've seen a few tests fail lately because Firefox suddenly
opened a tab with some "Privacy Study" in it and switched to it.
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1529626 , this
should be the way to disable these...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The previous attempt at this (in a20ea59) was wrong, because it
meant we didn't create the update repo at all, and we do need
the repo to exist in the support_server test every time (as the
point of the support server is to serve it out via NFS). We just
don't want to *use it on the support_server system itself* if
the releases don't match. So rejig things to do that properly.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We quite often want to run the update tests on a Koji task (not
a Bodhi update) for some reason - usually to test a potential
fix for an issue, or at a maintainer's request to test a change
before it is merged upstream and officially sent out as an
update. Up till now I've always hacked up utils.pm on the
staging server by hand to do this, which is horrible. Together
with a commit to fedora_openqa, this should allow us to do it in
a nice, sane way via the CLI. It's mostly just tweaking the
"updates" repo setup in utils.pm as you'd expect, but there's a
bit of subtlety to it because of the installer tests that use
%ADVISORY% as a variable substitution in the disk image name;
you can't do something like `%ADVISORY or KOJITASK%`, sadly, so
I had to have almost-redundant variables ADVISORY, KOJITASK and
ADVISORY_OR_TASK (we could kinda just live with ADVISORY_OR_TASK
except I didn't want to drop ADVISORY as it's an unnecessary
change from previous behavior).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The packages from this update seem to be breaking F28 update
tests for some reason; a later update has gone stable anyway, so
this is no longer needed.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
A bug showed up in Rawhide where, when you run startx in a tty,
when you exit that X session, the tty quits and returns to the
login prompt. This is a slightly sloppy workaround for that
problem.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
That clever-clever 'check the packages from the update were
installed' thing from yesterday breaks on kernel updates, as
they're installonly; after the update, the new version of the
package is installed, but the *old* version is too, and the way
I implemented the check, it treats that as a failure. Let's try
and handle this a somewhat-clever way (if this fails, I'm just
going to grep out lines with 'kernel' in them, as a *dumb* way).
Signed-off-by: Adam Williamson <awilliam@redhat.com>
If an update test fails before reaching advisory_post, we don't
generate the 'what update packages were installed' and 'were
any update packages *not* installed when they should have been'
logs, but these may well be useful for diagnosing the failure -
so let's also do the same stuff there. Only let's not do it all
twice.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We hit an interesting case in update testing recently:
https://bodhi.fedoraproject.org/updates/FEDORA-2018-115068f60e
An earlier version of that update failed testing. When we dug
into it a bit, we found that the test was failing because an
earlier version of the `pki-server` package was installed than
the version that was in the update; when asked (as part of
FreeIPA deployment) to install it, dnf had noticed that there
were dependency issues with the version of the package from the
update, but it happened to be able to install the version from
the frozen 'stable' repo...so it just went ahead and did that.
In this case, the 'missed' package resulted in a test failure,
but it'd actually be possible for this to happen and the test
to complete; we really ought to notice when this happens, and
treat it as a test failure.
So what this attempts to do is: at the end of all update tests,
check for all installed packages with the same name as a package
from the update, and compare their full NEVR to the one of the
package from the update. If a package with the same name as one
of the update packages is installed, but does not appear to be
the *same NEVR*, we fail, and upload the lists of packages for
manual investigation as to what the heck's going on.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
That whole creaky edifice of conditionals that figured out how
many times to press 'down' was a mess I always hated, and I just
found out that the fix for BLS wasn't complete - I'd assumed in
writing it that systems weren't being migrated to BLS on upgrade
to F30, but actually they are. This makes that design very hard
as we'd have had to find a way to change the number of 'down'
presses part-way through update tests, and all the ways I can
think of to do that would've made this even sillier.
Happily I managed to come up with what looks like a much simpler
approach: just go from the bottom. It seems that in every setup
I can think of to check - all three arches, BLS, no BLS, pre-
install, post-install - the linux line is two lines up from the
bottom of the config stanza (the last line is blank, and the
last line but one is the initramfs line). So we can just press
down 50 times (to make damn sure we're at the bottom) then press
up twice and we should be in the right place, no matter the arch,
the release, or if BLS is in use or not. Whew.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This bug is breaking all update FreeIPA tests; until the updates
go stable, let's pull them in to update tests so the results
are useful.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The one we were using before doesn't seem to exist any more in
Rawhide. /etc/os-release should be fine.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Now the BLS stuff is enabled in Rawhide, we need to press 'down'
a different number of times to reach the 'linux' line when
editing the boot params (I really, really wish there was a
better way to do this :<). It gets tricky as there are all sorts
of cases here (support_server tests use a CURRREL disk image,
and then there's upgrade tests)...I think this covers things for
now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Since a recent sssd update, console login during FreeIPA tests
is taking unusually long. We don't want this to fail all the
tests, so let's extend the timeout, but with a soft fail.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Somehow, recently, FreeIPA tests are running into Firefox not
quitting because it's showing a warning about closing multiple
tabs. (I think we didn't *get* multiple tabs before but now we
do, for some reason). So let's work around this by clicking
"Close tabs" if the warning appears.
Signed-off-by: Adam Williamson <awilliam@redhat.com>