Skip to content

tests: run dispvm preload tests once instead of per-template#785

Merged
marmarek merged 2 commits intoQubesOS:mainfrom
therohityadav:fix-10749-repeated-dispvm-tests
Mar 31, 2026
Merged

tests: run dispvm preload tests once instead of per-template#785
marmarek merged 2 commits intoQubesOS:mainfrom
therohityadav:fix-10749-repeated-dispvm-tests

Conversation

@therohityadav
Copy link
Copy Markdown
Contributor

@therohityadav therohityadav commented Mar 6, 2026

This patch isolates template-agnostic DispVM preload tests so they run only once instead of once per template.

  • DispVMHelpersMixin: Moves shared setup, teardown, and helper logic into a base mixin without template inference.
  • TC_20_DispVMMixin: Keeps the OS/GUI-dependent tests that run for each template.
  • TC_21_DispVM_Preload: Adds a standalone class to run template-independent preload tests once.

The following tests are moved to run only once:

  • test_011_preload_reject_max
  • test_012_preload_low_mem
  • test_015_preload_race_more
  • test_016_preload_race_less
  • test_017_preload_autostart
  • test_018_preload_global
  • test_019_preload_discard_outdated_volumes
  • test_020_preload_discard_outdated_volume_size
  • test_021_preload_discard_outdated_setting

Fixes QubesOS/qubes-issues#10749

@therohityadav therohityadav force-pushed the fix-10749-repeated-dispvm-tests branch 2 times, most recently from 42011c1 to 61a528f Compare March 7, 2026 12:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.11%. Comparing base (53ca30f) to head (f28f2dc).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
- Coverage   70.15%   70.11%   -0.04%     
==========================================
  Files          61       61              
  Lines       13995    13997       +2     
==========================================
- Hits         9818     9814       -4     
- Misses       4177     4183       +6     
Flag Coverage Δ
unittests 70.11% <ø> (-0.04%) ⬇️

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.

@ben-grande
Copy link
Copy Markdown
Contributor

  • Extract preload tests (test_011test_021) from TC_20_DispVMMixin

Please read again the issue. It is not all preload tests. I listed on the first the specific issues that need to be extracted to a separate class.

@therohityadav therohityadav force-pushed the fix-10749-repeated-dispvm-tests branch from 61a528f to af49ae6 Compare March 9, 2026 18:13
Copy link
Copy Markdown
Contributor

@ben-grande ben-grande left a comment

Choose a reason for hiding this comment

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

Just to let you know, you are in the right track.

For reviewers, split view seems better than unified view in this instance.

self.app.remove_handler, "domain-add", self._on_domain_add
)
self.adminvm = self.app.domains["dom0"]
self.init_default_template(self.template)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why? This is making more changes than what the commit should be, solely related to having a reusable class and a separate class for preloaded disposable tests that runs on all templates from the ones that don't need to run on all templates, just one. I think it makes sense to have it in the helper class also.

"--",
"qubesdb-read /name | tr -d '\n'",
]
logger.info("end")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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


def tearDown(self): # pylint: disable=invalid-name
logger.info("start")
if "gui" in self.disp_base.features:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

)
except subprocess.CalledProcessError as e:
stdout = getattr(e, "stdout", str(e))
logger.critical("{}: {}: {}".format(qube.name, cmd, stdout))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This and other things haven't been addressed. Please check all comments.

self.app.domains["dom0"],
default_dispvm,
self.disp_base,
self.disp_base_alt,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread qubes/tests/integ/dispvm.py Outdated

def load_tests(loader, tests, _pattern):
tests.addTests(loader.loadTestsFromNames(create_testcases_for_templates()))
tests.addTests(loader.loadTestsFromTestCase(TC_21_DispVM_Preload))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this won't run on any template. I think you should add some option to qubes.tests.create_testcases_for_template() to run the test on the default template. You might need to call init_default_template() from there.

Comment thread qubes/tests/__init__.py Outdated
if default_template_only and templates:
# Some tests are template-agnostic and should run only once
# to avoid slowing down the integration test suite.
templates = templates[:1]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't get the default template. But in case someone set QUBES_TEST_TEMPLATES for openqa, it may not match the app.default_template. Get the first template in that list if the variable is set, else, use self.app.default_template (self is not passed to that function, so it needs to be passed another way).

Comment thread qubes/tests/integ/dispvm.py Outdated
super().setUp()
self.setup_dispvm_nodes()
logger.info("end")
See QubesOS/qubes-issues#10749
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think there is need to have this comment. If you git blame the PR, you will see this issue in the commit message and in the PR message.

@therohityadav therohityadav force-pushed the fix-10749-repeated-dispvm-tests branch from e79bd1a to 4e27c1f Compare March 12, 2026 18:03
Comment thread qubes/tests/__init__.py Outdated
else:
try:
app = qubes.Qubes()
if app.default_template:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Marek, do you have a recommendation to avoid instantiating Qubes() here?

Copy link
Copy Markdown
Member

@marmarek marmarek Mar 13, 2026

Choose a reason for hiding this comment

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

While I don't have an idea for avoiding creating Qubes() instance to list templates (in absence of QUBES_TEST_TEMPLATES variable), I don't think you need to do that at all. Tests that are not template-specific (that would run on all (selected) templates) simply use default template, and have no template name in the test instance name. There is absolutely no need to handle the case of default template not being set.
I'd argue even the above choosing first template from QUBES_TEST_TEMPLATES (instead of the default one) is not necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@therohityadav I am sorry, it seems that I created this confusion (#785 (comment)). The old code seems correct.

@therohityadav therohityadav force-pushed the fix-10749-repeated-dispvm-tests branch 2 times, most recently from 60c3370 to facc9ee Compare March 17, 2026 12:32
@ben-grande
Copy link
Copy Markdown
Contributor

Reviewing on github is kinda hard because it shows "added" and "removed" lines, but not "moved" lines, which would facilitate a lot. I checked the first commit on a disposable and it seems the changes are fine, except that commit must be squashed first (a single commit).

Use default_template_only to avoid running the preload test for every
template. This significantly reduces CI runtime while preserving test
coverage.

Fixes QubesOS/qubes-issues#10749
@therohityadav therohityadav force-pushed the fix-10749-repeated-dispvm-tests branch from facc9ee to 2faea4b Compare March 17, 2026 17:08
@therohityadav
Copy link
Copy Markdown
Contributor Author

Reviewing on github is kinda hard because it shows "added" and "removed" lines, but not "moved" lines, which would facilitate a lot. I checked the first commit on a disposable and it seems the changes are fine, except that commit must be squashed first (a single commit).

Thank you for testing it locally, glad it works! I’ve squashed the commits into a single commit as requested.
Please let me know if anything else is needed.

@qubesos-bot
Copy link
Copy Markdown

qubesos-bot commented Mar 21, 2026

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026032922-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=2026032404-devel&flavor=update

  • system_tests_whonix

    • whonixcheck: wait_serial (wait serial expected)
      # wait_serial expected: qr/D8rIe-\d+-/...
  • system_tests_pvgrub_salt_storage

    • TC_41_HVMGrub_debian-13-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_001_standalone_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_network_ipv6

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-apps-features...
  • system_tests_dispvm_perf@hw7

  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: unnamed test (unknown)

    • gpu_passthrough: Failed (test died)
      # Test died: no candidate needle with tag(s) 'xterm' matched...

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

Failed tests

26 failures
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for anon-whonix failed...

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

    • whonixcheck: Failed (test died + timed out)
      # Test died: command 'qvm-run -ap whonix-gateway-18 'LC_ALL=C whon...

  • system_tests_pvgrub_salt_storage

    • TC_41_HVMGrub_debian-13-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_001_standalone_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_debian-13-xfce: test_011_template_based_vm_dracut (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-42-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-42-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_network_ipv6

  • system_tests_qwt_win10@hw13

    • windows_install: Failed (test died)
      # Test died: Install failed with code 1 at qubesos/tests/windows_in...
  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-apps-features...
  • system_tests_dispvm_perf@hw7

  • system_tests_gpu_passthrough@hw13

    • gpu_passthrough: unnamed test (unknown)

    • gpu_passthrough: Failed (test died)
      # Test died: no candidate needle with tag(s) 'xterm' matched...

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

Fixed failures

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

28 fixed
  • system_tests_network

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.network failed (exit code 1), details repor...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • VmNetworking_debian-13-xfce: test_203_fake_ip_inter_vm_allow (failure)
      ^... AssertionError: 1 != 0

  • system_tests_extra

    • system_tests: Fail (unknown)
      Tests qubes.tests.extra failed (exit code 1), details reported sepa...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_01_InputProxyExclude_debian-13-xfce: test_000_qemu_tablet (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_gui_interactive

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

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

  • system_tests_network_ipv6

  • system_tests_network_updates

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.dom0_update failed (exit code 1), details r...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_00_Dom0Upgrade_whonix-gateway-18: test_020_install_wrong_sign (error)
      subprocess.CalledProcessError: Command 'timeout=120; while ! tor-ci...

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_debian-13-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_fedora-42-xfce: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_000_template_list (failure)
      qvm-template: error: No matching templates to list

    • TC_11_QvmTemplateMgmtVM_whonix-gateway-18: test_010_template_install (failure)
      qvm-template: error: Template 'debian-12-minimal' not found.

  • system_tests_kde_gui_interactive

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

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

  • system_tests_audio

    • system_tests: Fail (unknown)
      Tests qubes.tests.integ.audio failed (exit code 1), details reporte...

    • system_tests: Failed (test died)
      # Test died: Some tests failed at qubesos/tests/system_tests.pm lin...

    • TC_20_AudioVM_Pulse_whonix-workstation-18: test_225_audio_rec_unmuted_hvm (failure)
      AssertionError: too short audio, expected 10s, got 7.59433106575963...

    • TC_20_AudioVM_PipeWire_debian-13-xfce: test_251_audio_playback_audiovm_pipewire_late_start (failure)
      AssertionError: pacat for test-inst-vm1 (xid 48) running(False) in ...

  • system_tests_qwt_win10_seamless@hw13

    • windows_install: Failed (test died)
      # Test died: Install failed with code 1 at qubesos/tests/windows_in...
  • system_tests_qwt_win11@hw13

    • windows_install: Failed (test died)
      # Test died: Install failed with code 1 at qubesos/tests/windows_in...
  • system_tests_guivm_vnc_gui_interactive

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

    • collect_logs: Failed (test died + timed out)
      # Test died: command 'curl --form upload=@journalctl.log --form upn...

Unstable tests

Details

Performance Tests

Performance degradation:

13 performance degradations
  • debian-13-xfce_exec: 8.36 🔻 ( previous job: 7.30, degradation: 114.50%)
  • fedora-42-xfce_socket-data-duplex: 96.20 🔻 ( previous job: 84.37, degradation: 114.02%)
  • whonix-workstation-18_socket: 9.20 🔻 ( previous job: 8.19, degradation: 112.25%)
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 374090.00 🔻 ( previous job: 485002.00, degradation: 77.13%)
  • fedora-42-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 258142.00 🔻 ( previous job: 337488.00, degradation: 76.49%)
  • fedora-42-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 42743.00 🔻 ( previous job: 73186.00, degradation: 58.40%)
  • fedora-42-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 258460.00 🔻 ( previous job: 339454.00, degradation: 76.14%)
  • fedora-42-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 84138.00 🔻 ( previous job: 95629.00, degradation: 87.98%)
  • fedora-42-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 2834.00 🔻 ( previous job: 4272.00, degradation: 66.34%)
  • fedora-42-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 1266.00 🔻 ( previous job: 1434.00, degradation: 88.28%)
  • fedora-42-xfce_dom0-dispvm-preload-6-gui-api (mean:4.445): 53.34 🔻 ( previous job: 44.96, degradation: 118.64%)
  • fedora-42-xfce_dom0-vm-gui-api (mean:0.055): 0.66 🔻 ( previous job: 0.46, degradation: 144.64%)
  • whonix-workstation-18_dom0-vm-api (mean:0.053): 0.64 🔻 ( previous job: 0.58, degradation: 111.46%)

Remaining performance tests:

91 tests
  • debian-13-xfce_exec-root: 26.19 🟢 ( previous job: 26.58, improvement: 98.54%)
  • debian-13-xfce_socket: 8.65 🔻 ( previous job: 8.02, degradation: 107.82%)
  • debian-13-xfce_socket-root: 9.16 🔻 ( previous job: 8.38, degradation: 109.25%)
  • debian-13-xfce_exec-data-simplex: 58.96 🟢 ( previous job: 66.06, improvement: 89.24%)
  • debian-13-xfce_exec-data-duplex: 66.76 🔻 ( previous job: 61.22, degradation: 109.05%)
  • debian-13-xfce_exec-data-duplex-root: 72.96 🔻 ( previous job: 72.95, degradation: 100.01%)
  • debian-13-xfce_socket-data-duplex: 84.18 🟢 ( previous job: 86.03, improvement: 97.84%)
  • fedora-42-xfce_exec: 9.09 🟢 ( previous job: 9.09, improvement: 100.00%)
  • fedora-42-xfce_exec-root: 59.82 🔻 ( previous job: 58.88, degradation: 101.60%)
  • fedora-42-xfce_socket: 8.20 🟢 ( previous job: 8.48, improvement: 96.64%)
  • fedora-42-xfce_socket-root: 8.51 🟢 ( previous job: 8.67, improvement: 98.18%)
  • fedora-42-xfce_exec-data-simplex: 67.07 🔻 ( previous job: 61.42, degradation: 109.19%)
  • fedora-42-xfce_exec-data-duplex: 60.86 🟢 ( previous job: 65.12, improvement: 93.46%)
  • fedora-42-xfce_exec-data-duplex-root: 82.04 🟢 ( previous job: 85.37, improvement: 96.10%)
  • whonix-gateway-18_exec: 8.14 🔻 ( previous job: 7.69, degradation: 105.85%)
  • whonix-gateway-18_exec-root: 121.58 🟢 ( previous job: 132.16, improvement: 91.99%)
  • whonix-gateway-18_socket: 7.57 🟢 ( previous job: 8.05, improvement: 94.06%)
  • whonix-gateway-18_socket-root: 7.50 🔻 ( previous job: 7.16, degradation: 104.81%)
  • whonix-gateway-18_exec-data-simplex: 68.81 🔻 ( previous job: 64.40, degradation: 106.84%)
  • whonix-gateway-18_exec-data-duplex: 68.33 🔻 ( previous job: 63.65, degradation: 107.36%)
  • whonix-gateway-18_exec-data-duplex-root: 124.12 🔻 ( previous job: 123.30, degradation: 100.66%)
  • whonix-gateway-18_socket-data-duplex: 114.42 🔻 ( previous job: 113.72, degradation: 100.62%)
  • whonix-workstation-18_exec: 8.57 🔻 ( previous job: 8.20, degradation: 104.50%)
  • whonix-workstation-18_exec-root: 135.72 🟢 ( previous job: 138.84, improvement: 97.75%)
  • whonix-workstation-18_socket-root: 8.35 🟢 ( previous job: 8.92, improvement: 93.67%)
  • whonix-workstation-18_exec-data-simplex: 66.34 🔻 ( previous job: 63.54, degradation: 104.40%)
  • whonix-workstation-18_exec-data-duplex: 64.29 🔻 ( previous job: 59.45, degradation: 108.13%)
  • whonix-workstation-18_exec-data-duplex-root: 134.99 🟢 ( previous job: 139.63, improvement: 96.68%)
  • whonix-workstation-18_socket-data-duplex: 85.74 🔻 ( previous job: 80.77, degradation: 106.14%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 242333.00 🟢 ( previous job: 217546.00, improvement: 111.39%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 445444.00 🟢 ( previous job: 70705.00, improvement: 630.00%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 186571.00 🟢 ( previous job: 42537.00, improvement: 438.61%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 11380.00 🔻 ( previous job: 12342.00, degradation: 92.21%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 10051.00 🟢 ( previous job: 3011.00, improvement: 333.81%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 7829.00 🟢 ( previous job: 1182.00, improvement: 662.35%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 5649.00 🟢 ( previous job: 793.00, improvement: 712.36%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 434552.00 🟢 ( previous job: 233483.00, improvement: 186.12%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 231934.00 🟢 ( previous job: 34913.00, improvement: 664.32%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 429744.00 🟢 ( previous job: 370521.00, improvement: 115.98%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 159961.00 🟢 ( previous job: 154458.00, improvement: 103.56%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 107644.00 🟢 ( previous job: 27602.00, improvement: 389.99%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 10550.00 🟢 ( previous job: 8434.00, improvement: 125.09%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7935.00 🟢 ( previous job: 7112.00, improvement: 111.57%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 4939.00 🟢 ( previous job: 4565.00, improvement: 108.19%)
  • fedora-42-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 399153.00 🔻 ( previous job: 429744.00, degradation: 92.88%)
  • fedora-42-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 233431.00 🟢 ( previous job: 82944.00, improvement: 281.43%)
  • fedora-42-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 39552.00 🟢 ( previous job: 28744.00, improvement: 137.60%)
  • fedora-42-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 85584.00 🟢 ( previous job: 82654.00, improvement: 103.54%)
  • fedora-42-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 2278.00 🟢 ( previous job: 1799.00, improvement: 126.63%)
  • fedora-42-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8483.00 🔻 ( previous job: 8983.00, degradation: 94.43%)
  • fedora-42-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 777.00 🔻 ( previous job: 808.00, degradation: 96.16%)
  • fedora-42-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 366891.00 🔻 ( previous job: 386785.00, degradation: 94.86%)
  • fedora-42-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 151025.00 🟢 ( previous job: 120146.00, improvement: 125.70%)
  • fedora-42-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 319980.00 🔻 ( previous job: 344699.00, degradation: 92.83%)
  • fedora-42-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 93001.00 🟢 ( previous job: 85237.00, improvement: 109.11%)
  • fedora-42-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 2469.00 🔻 ( previous job: 2529.00, degradation: 97.63%)
  • fedora-42-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8851.00 🟢 ( previous job: 8072.00, improvement: 109.65%)
  • fedora-42-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1508.00 🟢 ( previous job: 1142.00, improvement: 132.05%)
  • fedora-42-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 382134.00 🟢 ( previous job: 378820.00, improvement: 100.87%)
  • fedora-42-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 203168.00 🟢 ( previous job: 98064.00, improvement: 207.18%)
  • fedora-42-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 44157.00 🟢 ( previous job: 28807.00, improvement: 153.29%)
  • fedora-42-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8303.00 🟢 ( previous job: 8294.00, improvement: 100.11%)
  • debian-13-xfce_dom0-dispvm-api (mean:6.267): 75.20 🟢 ( previous job: 81.47, improvement: 92.30%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:8.086): 97.03 🔻 ( previous job: 92.38, degradation: 105.03%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.318): 39.82 🟢 ( previous job: 48.28, improvement: 82.48%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:2.975): 35.70 🟢 ( previous job: 44.34, improvement: 80.50%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:3.378): 40.54 🟢 ( previous job: 54.23, improvement: 74.75%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:2.357): 28.29 🟢 ( previous job: 40.37, improvement: 70.07%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.595): 31.14 🟢 ( previous job: 44.04, improvement: 70.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.43): 29.16 🟢 ( previous job: 45.36, improvement: 64.28%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.628): 55.53 🟢 ( previous job: 58.18, improvement: 95.45%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:3.758): 45.09 🔻 ( previous job: 43.54, degradation: 103.56%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:3.437): 41.24 🟢 ( previous job: 47.37, improvement: 87.05%)
  • debian-13-xfce_dom0-vm-api (mean:0.035): 0.42 🟢 ( previous job: 0.46, improvement: 91.29%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.046): 0.55 🔻 ( previous job: 0.51, degradation: 109.31%)
  • fedora-42-xfce_dom0-dispvm-gui-api (mean:8.232): 98.78 🟢 ( previous job: 101.79, improvement: 97.04%)
  • fedora-42-xfce_dom0-dispvm-preload-2-gui-api (mean:4.846): 58.15 🟢 ( previous job: 62.91, improvement: 92.44%)
  • fedora-42-xfce_dom0-dispvm-preload-4-gui-api (mean:4.348): 52.17 🔻 ( previous job: 51.39, degradation: 101.52%)
  • fedora-42-xfce_dom0-vm-api (mean:0.037): 0.45 🔻 ( previous job: 0.43, degradation: 104.17%)
  • whonix-workstation-18_dom0-dispvm-api (mean:8.134): 97.61 🟢 ( previous job: 114.77, improvement: 85.04%)
  • whonix-workstation-18_dom0-dispvm-gui-api (mean:10.42): 125.04 🟢 ( previous job: 127.27, improvement: 98.24%)
  • whonix-workstation-18_dom0-dispvm-preload-2-api (mean:4.221): 50.65 🟢 ( previous job: 70.96, improvement: 71.38%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-0-api (mean:4.159): 49.91 🟢 ( previous job: 65.29, improvement: 76.45%)
  • whonix-workstation-18_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:4.483): 53.79 🟢 ( previous job: 74.32, improvement: 72.38%)
  • whonix-workstation-18_dom0-dispvm-preload-4-api (mean:3.344): 40.13 🟢 ( previous job: 57.74, improvement: 69.49%)
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-0-api (mean:3.344): 40.13 🟢 ( previous job: 65.76, improvement: 61.03%)
  • whonix-workstation-18_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:3.474): 41.69 🟢 ( previous job: 59.80, improvement: 69.71%)
  • whonix-workstation-18_dom0-dispvm-preload-2-gui-api (mean:5.692): 68.30 🟢 ( previous job: 78.19, improvement: 87.36%)
  • whonix-workstation-18_dom0-dispvm-preload-4-gui-api (mean:4.778): 57.33 🟢 ( previous job: 65.73, improvement: 87.23%)
  • whonix-workstation-18_dom0-dispvm-preload-6-gui-api (mean:4.147): 49.77 🟢 ( previous job: 61.35, improvement: 81.12%)
  • whonix-workstation-18_dom0-vm-gui-api (mean:0.052): 0.62 🟢 ( previous job: 0.62, improvement: 99.84%)

@ben-grande
Copy link
Copy Markdown
Contributor

Reviewing on github is kinda hard because it shows "added" and "removed" lines, but not "moved" lines, which would facilitate a lot. I checked the first commit on a disposable and it seems the changes are fine, except that commit must be squashed first (a single commit).

Thank you for testing it locally, glad it works! I’ve squashed the commits into a single commit as requested. Please let me know if anything else is needed.

I haven't tested it locally. When I said that "I checked the first commit", I meant that I did "git diff". Not that I "checked out the commit and ran the tests". So know I see how what I wrote could be misinterpreted. But the context from the first phrase is important:

Reviewing on github is kinda hard because it shows "added" and "removed" lines, but not "moved" lines, which would facilitate a lot.


I'd like you to look at the openqa run and analyze it and report your findings. I want you to understand what changed on openqa. Tip: compare with previous run.

I will start: compared to a previous run from 3 days ago in "pull requests" group, it shortened the total run time in 50 minutes. I intentionally didn't link the previous run so you search for it.

Comment thread qubes/tests/integ/dispvm.py Outdated


def create_preload_testcases_for_default_template():
return qubes.tests.create_testcases_for_templates(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests that are supposed to be running just on one template don't need the mixin approach at all. Simply define class inheriting from qubes.tests.SystemTestCase directly and call self.init_default_template() in setUp(). To make the changes simpler, you can also add self.template = self.app.default_template, so you still have the self.template attribute like in the other tests.

And then there is no need calling create_testcases_for_templates() for those tests at all, as unittest/pytest/nose will already correctly discover them automatically.

This is an example of test class running on a single (default) template: https://github.com/QubesOS/qubes-core-admin/blob/main/qubes/tests/integ/basic.py#L52

@therohityadav
Copy link
Copy Markdown
Contributor Author

Hey @marmarek, the latest commit triggered a CI failure, but it seems to happen at the very end during the artifacts upload step:

FATAL: flag provided but not defined: -timeout

From the logs, this appears to be related to a GitLab Runner mismatch (runner 18.10.0 vs helper 18.7.2), rather than a failure in the test execution itself.

Could you please confirm if this is an infrastructure issue, or if I should recheck anything on my side?

@marmarek
Copy link
Copy Markdown
Member

Could you please confirm if this is an infrastructure issue, or if I should recheck anything on my side?

Yup, that's unrelated to your PR.

@marmarek
Copy link
Copy Markdown
Member

system_tests_dispvm

* TC_20_DispVM_debian-13-xfce: [test_010_dvm_run_simple](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/1) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_debian-13-xfce: [test_013_preload_gui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/2) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_debian-13-xfce: [test_014_preload_nogui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/3) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_debian-13-xfce: [test_080_gui_app](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/4) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_debian-13-xfce: [test_090_edit_file](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/5) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_debian-13-xfce: [test_100_open_in_dispvm](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_debian-13-xfce/6) (error)
  `AttributeError: 'TC_20_DispVM_debian-13-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_010_dvm_run_simple](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/1) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_013_preload_gui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/2) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_014_preload_nogui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/3) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_080_gui_app](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/4) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_090_edit_file](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/5) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_fedora-42-xfce: [test_100_open_in_dispvm](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_fedora-42-xfce/6) (error)
  `AttributeError: 'TC_20_DispVM_fedora-42-xfce' object has no attribu...`

* TC_20_DispVM_whonix-workstation-18: [test_010_dvm_run_simple](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/1) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

* TC_20_DispVM_whonix-workstation-18: [test_013_preload_gui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/2) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

* TC_20_DispVM_whonix-workstation-18: [test_014_preload_nogui](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/3) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

* TC_20_DispVM_whonix-workstation-18: [test_080_gui_app](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/4) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

* TC_20_DispVM_whonix-workstation-18: [test_090_edit_file](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/5) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

* TC_20_DispVM_whonix-workstation-18: [test_100_open_in_dispvm](https://openqa.qubes-os.org/tests/171510#step/TC_20_DispVM_whonix-workstation-18/6) (error)
  `AttributeError: 'TC_20_DispVM_whonix-workstation-18' object has no ...`

Those failures look to be related to this PR.

Inherits directly from SystemTestCase to bypass the template factory
and reverts __init__.py changes to the default original file. Assigns
self.template to .name to prevent TypeErrors in helper methods.
@marmarek
Copy link
Copy Markdown
Member

The split between the two commits is not great, but we can live with that.

@marmarek marmarek merged commit 2488f2b into QubesOS:main Mar 31, 2026
4 of 6 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.

Disposable integration tests (system_tests_dispvm) have repeated tests, making the run slower than it should

4 participants