Skip to content

Conversation

@ben-grande
Copy link
Contributor

@codecov
Copy link

codecov bot commented Jun 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.74%. Comparing base (bc20def) to head (e9151ea).
Report is 28 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #686      +/-   ##
==========================================
+ Coverage   70.59%   70.74%   +0.15%     
==========================================
  Files          61       61              
  Lines       13306    13374      +68     
==========================================
+ Hits         9393     9462      +69     
+ Misses       3913     3912       -1     
Flag Coverage Δ
unittests 70.74% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qubesos-bot
Copy link

qubesos-bot commented Jun 8, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025070402-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025061004-4.3&flavor=update

  • system_tests_basic_vm_qrexec_gui

    • TC_20_NonAudio_whonix-gateway-17: test_400_long_window_title (error)
      subprocess.CalledProcessError: Command 'qubes.WaitForSession' retur...
  • system_tests_extra

    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 0 == 0
  • system_tests_guivm_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-test-file' matc...
  • system_tests_kde_gui_interactive

    • kde_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/1YA~i-\d+-/...

    • kde_install: Failed (test died + timed out)
      # Test died: command '(set -o pipefail; sudo qubes-dom0-update -y k...

  • system_tests_basic_vm_qrexec_gui_zfs

    • switch_pool: wait_serial (wait serial expected)
      # wait_serial expected: qr/eVFUj-\d+-/...

    • switch_pool: Failed (test died + timed out)
      # Test died: command 'qubes-dom0-update -y zfs' timed out at /usr/l...

  • system_tests_guivm_vnc_gui_interactive

    • update_guivm: Failed (test died)
      # Test died: command 'curl --form upload=@qubesctl-sys-gui.log --fo...

Failed tests

10 failures
  • system_tests_basic_vm_qrexec_gui

    • TC_20_NonAudio_whonix-gateway-17: test_400_long_window_title (error)
      subprocess.CalledProcessError: Command 'qubes.WaitForSession' retur...
  • system_tests_extra

    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError: 0 == 0

    • TC_00_QVCTest_whonix-workstation-17: test_010_screenshare (failure)
      AssertionError: 1 != 0 : Timeout waiting for /dev/video0 in test-in...

  • system_tests_guivm_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-test-file' matc...
  • system_tests_kde_gui_interactive

    • kde_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/1YA~i-\d+-/...

    • kde_install: Failed (test died + timed out)
      # Test died: command '(set -o pipefail; sudo qubes-dom0-update -y k...

  • system_tests_basic_vm_qrexec_gui_zfs

    • switch_pool: wait_serial (wait serial expected)
      # wait_serial expected: qr/eVFUj-\d+-/...

    • switch_pool: Failed (test died + timed out)
      # Test died: command 'qubes-dom0-update -y zfs' timed out at /usr/l...

  • system_tests_guivm_vnc_gui_interactive

    • update_guivm: Failed (test died)
      # Test died: command 'curl --form upload=@qubesctl-sys-gui.log --fo...

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/142375#dependencies

12 fixed
  • system_tests_splitgpg

  • system_tests_extra

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_guivm_vnc_gui_interactive

    • simple_gui_apps: unnamed test (unknown)
    • simple_gui_apps: Failed (test died)
      # Test died: no candidate needle with tag(s) 'vm-settings-applicati...
  • system_tests_audio

Unstable tests

Details

Performance Tests

Performance degradation:

No issues

Remaining performance tests:

No remaining performance tests

@marmarek
Copy link
Member

marmarek commented Jun 8, 2025

There are some results in https://openqa.qubes-os.org/tests/142046 already. I'm not sure what is causing some of those failures yet.

@ben-grande
Copy link
Contributor Author

There are some results in https://openqa.qubes-os.org/tests/142046 already. I'm not sure what is causing some of those failures yet.

I don't see this PR included on OpenQA:

@ben-grande
Copy link
Contributor Author

Not ready, some corner cases when modifying either global or local qube feature.

@ben-grande ben-grande force-pushed the preload-dispvm-dom0-feat branch from bb71368 to 3a10acd Compare June 24, 2025 16:23
global preload feature is set."""
assert isinstance(self, qubes.vm.BaseVM)
if (
self == getattr(self, "default_dispvm", None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self == getattr(self, "default_dispvm", None)
self == getattr(self.app, "default_dispvm", None)

otherwise you'll check VM's "default_dispvm" property, not the global one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@ben-grande ben-grande force-pushed the preload-dispvm-dom0-feat branch 4 times, most recently from c5cf131 to f105a73 Compare June 25, 2025 09:24
value = None
if (
not force_local
and not getattr(self, "preload_max_ignore_global", False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what case this attribute is needed? When event handler sets it, the global default_dispvm is changed already, so the below condition would handle it already, no?
But if there is a case where it's needed, please add it properly in __init__ (mixin class can have __init__ too, just don't forget to call super()).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appears to be misconception that I presumed it would be needed and didn't test without it, plus it was before force_local.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be a case where it is needed. I tested without it and it worked.

**app**:

property-(re)?set:default_dispvm:

* old_appvm = True
* new_appvm = False

**vm.adminvm**:

domain-feature-delete:preload-dispvm-max:

* True

domain-feature-set:preload-dispvm-max:

* False

Comment on lines 1141 to 1162
mock_new.assert_called_once()
self.assertEqual(
"domain-preload-dispvm-start", mock_new.call_args[0][0]
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mock_new.assert_called_once()
self.assertEqual(
"domain-preload-dispvm-start", mock_new.call_args[0][0]
)
mock_new.assert_called_once_with("domain-preload-dispvm-start")

If there are other args that are not interesting for test, you can use unittest.mock.ANY as a placeholder.
Besides being easier to read, it's also easier to spot mistakes like too much copy&paste - see the one below checks mock_new again...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented with mock.ANY locally, much better.

) as mock_new:
self.app.default_dispvm = self.appvm_alt
mock_old.assert_not_called()
mock_new.assert_called_once()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert_called_once_with

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@marmarek
Copy link
Member

Now this needs a rebase

@ben-grande ben-grande force-pushed the preload-dispvm-dom0-feat branch 3 times, most recently from 4c9cbdb to e45fee0 Compare June 30, 2025 12:32
@ben-grande
Copy link
Contributor Author

The global preload test is quite large for a single test but it has the advantage of having less code duplication, as later tests depends on previous tests plus there is a clear distinction between tests with logging.

@ben-grande
Copy link
Contributor Author

Liberated for OpenQA.

@ben-grande
Copy link
Contributor Author

https://openqa.qubes-os.org/tests/145326#step/TC_20_DispVM_debian-12-xfce/6
https://openqa.qubes-os.org/tests/145326#step/TC_20_DispVM_fedora-42-xfce/6

race_more timed out on Debian and Fedora (4 qubes swap) but not on Whonix (3 qube swap). I am reducing the number of qubes on Fedora and Debian also...

@ben-grande ben-grande force-pushed the preload-dispvm-dom0-feat branch from e45fee0 to befb836 Compare July 1, 2025 07:54
# each test function is applied.
if "_preload_" not in self._testMethodName:
self.app.default_dispvm = self.disp_base
self.cleanup_preload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.cleanup_preload
self.cleanup_preload()

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, when running the test directly, it doesn't skip like it did on OpenQA. Fixing this mistake led to find another wrong function call.

tasks = [self.app.domains[x].cleanup() for x in old_preload]
self.loop.run_until_complete(asyncio.gather(*tasks))
self.disp_base.features["preload-dispvm-max"] = False
self.cleanup_preload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ben-grande ben-grande force-pushed the preload-dispvm-dom0-feat branch from befb836 to e9151ea Compare July 3, 2025 14:31
@ben-grande
Copy link
Contributor Author

Ran with the latest commit

$ git rev-parse HEAD
e9151eab0d2cb7698dba80760f0b52516194eff8
$ /home/user/run-tests -l | grep 'fedora.*preload' > /tmp/integ
$ time /home/user/run-tests $(tr '\n' ' ' </tmp/integ)
...
Ran 8 tests in 215.540s

OK

real    3m38.406s
user    0m0.045s
sys     0m0.101s

@ben-grande
Copy link
Contributor Author

Results for #145573 qubesos-4.3-pull-requests-x86_64-Build2025070402-4.3-system_tests_dispvm@64bit

Result: passed, finished about an hour ago (ran for 33:22 minutes)
Scheduled product: qubesos-4.3-pull-requests-x86_64-2025070402-4.3
Assigned worker: ramen:10

Finally :)

@marmarek marmarek merged commit 62f2936 into QubesOS:main Jul 4, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants