Commit Graph

357 Commits

Author SHA1 Message Date
Cole Robinson
0755711372 tests: uitests: cover cli changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-11-12 23:12:36 +01:00
Cole Robinson
48ec63cce2 tests: uitests: tweak for panic dev changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-11-12 09:57:47 -05:00
Cole Robinson
7dd7383bcb tests: uitests: cover serial autoconnect bug fix
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-11-11 14:06:42 -05:00
Cole Robinson
97ab16a73d uitests: fix coverage with scaling default change
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-11-11 14:55:26 +01:00
Pavel Hrdina
31eab9b46a pylint: fix false positive errors
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2024-10-13 17:11:06 +02:00
Cole Robinson
d231e66a96 console: Fix resize_to_vm with host fractional scaling
Trying to size the window based on VM desktop resolution does
not do the correct thing when host fractional scaling is enabled
and using spice.

The best we can do here is ask the viewer widget for its
preferred size

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-10-10 11:15:35 -04:00
Cole Robinson
4941bb922f testmock: Remove some console mocking that's no longer required
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-26 09:19:57 -04:00
Cole Robinson
b83a1b0d0f domain: Use KEEP_TPM flag for domain rename
If the VM has implicit TPM state, use the VIR_DOMAIN_UNDEFINE_KEEP_TPM
flag to preserve that state when renaming the VM (if libvirt is new
enough).

The state is stored based on VM UUID and nothing else, and the UUID
is preserved during rename, so we don't need to do any of the same
trickery that's required for nvram duplication.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-19 05:48:01 +02:00
Cole Robinson
c6bc3a8667 tests: uitests: test localhost tcp graphics
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-11 12:17:06 -04:00
Cole Robinson
258df88eab domain: tweak q35 <-> pc editing
* add_q35_pcie_controllers already skips adding controllers if
  any type=pci already exist, so delete the extra checking
* be more paranoid and only run the live edits when the machine
  type actually changed from an expected config

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-10 16:35:03 -04:00
Cole Robinson
f4a9722dc6 uitests: cover serial console changes
+ Drop test_livetests bit which was working around the old behavior
+ Add test_details piece that covers the new behavior, and
  ideal behavior that we maintain the selection across VM restarts.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-09-07 13:38:42 -04:00
Cole Robinson
29145b9e93 Fix some pylint
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-26 11:36:01 -04:00
Cole Robinson
954c9b6bf7 uitests: createvm: fix case on f40
We should be checking 'selected' here, not 'focused'. This stopped
working on f40 apparently

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-14 11:36:13 -04:00
Cole Robinson
2ddbea5d0b uitests: Fix get_text() on fedora40
Seems like some dependent lib started exposing a similarly named
function, so ours stopped working

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-14 06:17:10 -04:00
Cole Robinson
0cad0c4dff uitests: force internal snapshots in test_snapshot.py
Incase the libvirt test driver ever starts advertising support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-12 19:55:58 -04:00
Cole Robinson
a00c090022 uitests: handle newer libvirt test driver UpdateDevice support
Make it fail for the cases that expect it

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-12 19:55:58 -04:00
Cole Robinson
2e1bacfd33 uitests: Add live external snapshot testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-12 19:55:58 -04:00
Cole Robinson
95ca39aae8 uitests: test xmleditor textview fallback
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-08-12 19:54:45 -04:00
Cole Robinson
a6b62a20b6 systray: Cleanups and improvements for --show-systray
- Add UI coverage
- Drop redundant systray_instance caching
- Tweaks help test and docs
- Show an error if the systray doesn't embed

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 14:18:04 -05:00
Cole Robinson
2043847ade uitests: More handling for slow startup on f39
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 14:18:04 -05:00
Cole Robinson
014d1ef99b console: Cleanup and improve console menu handling
- Rework the ConsolePages abstraction to carry the Gtk.Menu. makes
  it all less messy

- Make the console menu the single source of truth for console
  embeddability, and error message reporting

- Small misc cleanups here and there

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 12:52:37 -05:00
Cole Robinson
0c899a7ccd uitests: Handle slow app launch on fedora 39
Not quite sure what's going on here, I think it has something to
do with slowness when the accessibility bus is being polled.

Add some infrastructure to increase the timeout while we wait for
the app to pop up

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 10:43:30 -05:00
Cole Robinson
a05ab5cdb4 uitests: Fix walkUI flakyness
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-03 10:43:30 -05:00
Cole Robinson
82f1c4495e domain: rename: handle firmware ending with .qcow2
Newer libvirt + edk2 will default to nvram in qcow2 format, but
our domain rename code had some .fd assumptions baked in.

Adjust uitests to handle it too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-03-02 13:22:37 -05:00
Cole Robinson
4e2bec5b14 tests: ui: make creatnet test start less flakey
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-01-23 13:28:07 -05:00
Cole Robinson
acf3cedbbf tests: ui: make newvm test start less flakey
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2024-01-23 09:07:29 -05:00
Cole Robinson
775edfd5dc connectauth: Drop sanity checking for libvirtd
Nowadays with libvirt split daemons, libvirtd isn't required to
be installed for a first run local connection to succeed, so we
are needlessly blocking the app from 'just working' in many cases.
Especially considering that many distros often have libvirt running
out of the box due to gnome-boxes pulling it in.

Drop the daemon checking entirely.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-09-24 16:31:58 -04:00
Cole Robinson
7cd6151a21 uitests: Drop hotplug work around, f38 libvirt is fixed now
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-24 12:49:02 -04:00
Cole Robinson
64bd6ba53e tests: uitests: make menu operations more robust
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
509c95ddb9 uitests: More attempts at making manager reposition test reliable
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
75422ec75e uitests: Make hotplug test pass on both f37 and f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-06 19:43:24 -04:00
Cole Robinson
6030049cd7 tests: uitests: Fix manager window repositioning test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:48:24 -04:00
Cole Robinson
7f83d23f4f tests: livetests: work around qemu media change regression
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 15:47:25 -04:00
Cole Robinson
909c8aa880 tests: uitests: Fix window reposition on f38
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2023-05-05 14:54:31 -04:00
Cole Robinson
58ffe7fa7a tests: uitests: livetests: Fix LXC domain cleanup
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-08-01 10:38:01 -04:00
Cole Robinson
d51541e155 Fix UI rename with firmware='efi'
Our code to duplicate nvram wasn't expecting the XML to be devoid
of an nvram path.

Resolves: https://github.com/virt-manager/virt-manager/issues/372

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-06-20 09:37:26 -04:00
Cole Robinson
1aaa28e26a tests: uitests: Add coverage for when spice is missing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 14:23:09 -05:00
Cole Robinson
365d1f5d56 diskbackend: Set relative path for media change
Via the virt-manager UI we aren't converting relative path to
absolute path, even though we do it internally when needed.

We were benefiting from this in the test suite in some ways, so we
need to adjust tests to strip out the dev dir on XML comparison

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson
59595aebb7 uitests: details: Break out table cell click helper
We may want to move this to generic code at some point

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:26 -05:00
Cole Robinson
1f20ef7e07 tests: testdriver: Have all pools use pool- prefix
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:44:13 -05:00
Cole Robinson
435c7181f1 tests: testdriver: Rename default-pool -> pool-dir
And move the path to not be rooted in /dev, which doesn't make
sense for a directory pool, and triggers some special /dev handling
in virtinst that we don't want in the common testing path.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 13:03:04 -05:00
Cole Robinson
6a21b38ae8 tests: testdriver: Rename disk-pool -> pool-logical
It _is_ type=logical, so make it clear in the naming. Plus we
already have a type=disk pool named pool-disk

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 12:55:48 -05:00
Cole Robinson
9c0a132f2a fsdetails: Point users to Memory screen if shared memory not enabled
If the user selects virtiofs when editting or adding a new VM, and
we don't detect that they have shared memory enabled, show
a warning label in the UI pointing them to the Memory screen.

It would be nicer if we did this for them, but to get that totally
correct would require both duplicating libvirt's shared memory
detection logic, and some surgery to the addhw wizard. This is good
enough for now

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:44:29 -05:00
Cole Robinson
fd181cecc3 virtManager: Split out tpmdetails.py and tweak it
Split out tpmdetails.py, following the pattern of fsdetails.py. This
adds more UI editing fields for an already attached TPM.

Move the model and version under an 'Advanced options' expander,
since we should be getting this correct by default.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 10:02:22 -05:00
Cole Robinson
0c2cb36475 tests: uitests: Test linux2020 osinfo usage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
8903b470f1 details: Have 'copy host CPU' mean 'host-passthrough'
Adjust the UI to leave the box checked for both host-model and
host-passthrough, but host-passthrough is now what it means when
the user selects it. host-model can still be selected via the
CPU model drop down list

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 14:03:44 -05:00
Cole Robinson
8377b7f7b6 details: Remove 'detect zeroes' UI
After checking with qemu devs, this option is not really recommended
for common usage and doesn't get used much in practice. So I don't
think it is suitable for the UI

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-03 13:50:53 -05:00
Cole Robinson
c3e9db5f3a createvm: Tweaks to new UEFI pref
* Make it clear in code and UI that this is x86 only. Other arches
  either require UEFI (aarch64) or don't support it
* Drop the internal 'bios' values since we don't handle them and may
  not want them anyways, since when win11 support lands we will need
  to explicitly throw an error if the user tries to force bios
* Add UI tests

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-31 14:18:42 -05:00
Cole Robinson
5003f0432e details: Add os.firmware=efi in the firmware selector UI
Let users choose libvirt's os.firmware=efi setting in the UI, putting
it about the firmware path list, since it's the preferred default
these days.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-26 13:23:27 -05:00
Cole Robinson
6c3b5def81 netlist: Revive portgroup UI
I removed Portgroup UI in 4c3c53f773 release 3.0.0, but there's been
a steady stream of requests to bring it back. It seems it's commonly
used with some certain openvswitch config.

Maint burden isn't too bad. Let's bring it back

Fixes: https://github.com/virt-manager/virt-manager/issues/169

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-01-25 16:01:17 -05:00