Skip to content

Conversation

@marmarek
Copy link
Member

@marmarek marmarek commented Aug 7, 2025

Reduce code duplication by calling the same events as on normal netvm change. Especially, this fixes missing detaching old netvm before attaching new one.

Fixes QubesOS/qubes-issues#10125

Do not exclude network-providing qubes when checking if changing
default_netvm is allowed.
Avoid collision with similar function in dvmtemplate mixin.
Do not duplicate the check if changing to non-running netvm. But more
importantly, call the property-pre-set event to unset old netvm.
Otherwise setting the new one will fail (property-reset:netvm handler
assumes matching pre-(re)set handler detached old value already).
DO not use property-pre-reset:netvm here, because it can't know the new
value yet (pre-reset is used when changing non-default to default value,
so normally it can check what is the default value at the call time -
but here it wouldn't work because the default value is going to change).

Fixes QubesOS/qubes-issues#10125
@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.59%. Comparing base (080694e) to head (0d341f7).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
+ Coverage   70.47%   70.59%   +0.12%     
==========================================
  Files          61       61              
  Lines       13560    13561       +1     
==========================================
+ Hits         9557     9574      +17     
+ Misses       4003     3987      -16     
Flag Coverage Δ
unittests 70.59% <100.00%> (+0.12%) ⬆️

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.

Check if attach/detach network functions are called.

QubesOS/qubes-issues#10125
@qubesos-bot
Copy link

qubesos-bot commented Aug 8, 2025

OpenQA test summary

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

    • TC_20_DispVM_debian-12-xfce: test_019_preload_refresh (error + timed out)
      qubes.exc.QubesVMShutdownTimeoutError: Domain shutdown timed out: '...
  • system_tests_audio

  • system_tests_qwt_win10@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'file-copy-prompt' mat...
  • 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_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/qDqV_-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_dispvm_perf@hw7

    • TC_00_DispVMPerf_whonix-workstation-17: test_003_dispvm_gui_concurrent (failure)
      AssertionError: '/usr/lib/qubes/tests/dispvm_perf.py --dvm=test-ins...
  • system_tests_basic_vm_qrexec_gui@hw7

    • startup: unnamed test (unknown)
    • startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'nm-applet' matched...
  • system_tests_guivm_gpu_gui_interactive@hw13

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

    • guivm_startup: Failed (test died + timed out)
      # Test died: command '! qvm-check sys-whonix || time qvm-start sys-...

Failed tests

15 failures
  • system_tests_dispvm

    • TC_20_DispVM_debian-12-xfce: test_019_preload_refresh (error + timed out)
      qubes.exc.QubesVMShutdownTimeoutError: Domain shutdown timed out: '...
  • system_tests_audio

  • system_tests_qwt_win10@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'file-copy-prompt' mat...
  • 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_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/qDqV_-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_dispvm_perf@hw7

    • TC_00_DispVMPerf_whonix-workstation-17: test_003_dispvm_gui_concurrent (failure)
      AssertionError: '/usr/lib/qubes/tests/dispvm_perf.py --dvm=test-ins...
  • system_tests_basic_vm_qrexec_gui@hw7

    • startup: unnamed test (unknown)
    • startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'nm-applet' matched...
  • 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_gpu_gui_interactive@hw13

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

    • guivm_startup: Failed (test died + timed out)
      # Test died: command '! qvm-check sys-whonix || time qvm-start sys-...

Fixed failures

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

11 fixed

Unstable tests

Performance Tests

Performance degradation:

3 performance degradations
  • debian-12-xfce_exec-data-simplex: 72.58 🔺 ( previous job: 65.51, degradation: 110.79%)
  • debian-12-xfce_exec-data-duplex-root: 82.13 🔺 ( previous job: 70.01, degradation: 117.32%)
  • whonix-workstation-17_exec-data-duplex-root: 108.22 🔺 ( previous job: 86.00, degradation: 125.83%)

Remaining performance tests:

130 tests
  • debian-12-xfce_exec: 7.94 🟢 ( previous job: 8.63, improvement: 91.99%)
  • debian-12-xfce_exec-root: 27.65 🟢 ( previous job: 29.44, improvement: 93.93%)
  • debian-12-xfce_socket: 8.46 🟢 ( previous job: 8.50, improvement: 99.51%)
  • debian-12-xfce_socket-root: 8.62 🔺 ( previous job: 8.31, degradation: 103.64%)
  • debian-12-xfce_exec-data-duplex: 69.64 🟢 ( previous job: 73.55, improvement: 94.69%)
  • debian-12-xfce_socket-data-duplex: 144.00 🟢 ( previous job: 161.35, improvement: 89.24%)
  • fedora-42-xfce_exec: 9.10
  • fedora-42-xfce_exec-root: 58.20
  • fedora-42-xfce_socket: 8.75
  • fedora-42-xfce_socket-root: 8.48
  • fedora-42-xfce_exec-data-simplex: 60.85
  • fedora-42-xfce_exec-data-duplex: 74.87
  • fedora-42-xfce_exec-data-duplex-root: 102.84
  • fedora-42-xfce_socket-data-duplex: 157.36
  • whonix-gateway-17_exec: 6.12 🟢 ( previous job: 7.34, improvement: 83.32%)
  • whonix-gateway-17_exec-root: 41.46 🔺 ( previous job: 39.57, degradation: 104.76%)
  • whonix-gateway-17_socket: 7.88 🔺 ( previous job: 7.85, degradation: 100.31%)
  • whonix-gateway-17_socket-root: 7.36 🟢 ( previous job: 7.89, improvement: 93.27%)
  • whonix-gateway-17_exec-data-simplex: 78.75 🔺 ( previous job: 77.76, degradation: 101.26%)
  • whonix-gateway-17_exec-data-duplex: 79.16 🔺 ( previous job: 78.39, degradation: 100.98%)
  • whonix-gateway-17_exec-data-duplex-root: 94.20 🔺 ( previous job: 90.74, degradation: 103.81%)
  • whonix-gateway-17_socket-data-duplex: 166.64 🔺 ( previous job: 161.95, degradation: 102.90%)
  • whonix-workstation-17_exec: 8.07 🟢 ( previous job: 8.27, improvement: 97.58%)
  • whonix-workstation-17_exec-root: 54.29 🟢 ( previous job: 57.61, improvement: 94.24%)
  • whonix-workstation-17_socket: 9.13 🔺 ( previous job: 8.97, degradation: 101.82%)
  • whonix-workstation-17_socket-root: 8.10 🟢 ( previous job: 9.46, improvement: 85.58%)
  • whonix-workstation-17_exec-data-simplex: 78.77 🔺 ( previous job: 74.54, degradation: 105.68%)
  • whonix-workstation-17_exec-data-duplex: 76.07 🔺 ( previous job: 74.84, degradation: 101.65%)
  • whonix-workstation-17_socket-data-duplex: 170.98 🔺 ( previous job: 160.20, degradation: 106.73%)
  • debian-12-xfce_dispvm(avg:6.038): 96.61
  • debian-12-xfce_dispvm-gui(avg:7.168): 114.69
  • debian-12-xfce_dispvm-concurrent(avg:2.855): 45.67
  • debian-12-xfce_dispvm-gui-concurrent(avg:3.517): 56.27
  • debian-12-xfce_dispvm-dom0(avg:6.747): 107.95
  • debian-12-xfce_dispvm-dom0-gui(avg:7.949): 127.19
  • debian-12-xfce_dispvm-dom0-concurrent(avg:3.278): 52.45
  • debian-12-xfce_dispvm-dom0-gui-concurrent(avg:3.819): 61.10
  • debian-12-xfce_dispvm-preload(avg:3.539): 56.62
  • debian-12-xfce_dispvm-preload-gui(avg:4.014): 64.23
  • debian-12-xfce_dispvm-preload-concurrent(avg:2.604): 41.66
  • debian-12-xfce_dispvm-preload-gui-concurrent(avg:3.198): 51.16
  • debian-12-xfce_dispvm-preload-dom0(avg:3.556): 56.90
  • debian-12-xfce_dispvm-preload-dom0-gui(avg:5.308): 84.93
  • debian-12-xfce_dispvm-preload-dom0-concurrent(avg:2.925): 46.81
  • debian-12-xfce_dispvm-preload-dom0-gui-concurrent(avg:3.666): 58.65
  • debian-12-xfce_dispvm-api(avg:6.828): 109.25
  • debian-12-xfce_dispvm-gui-api(avg:7.894): 126.31
  • debian-12-xfce_dispvm-concurrent-api(avg:3.222): 51.56
  • debian-12-xfce_dispvm-gui-concurrent-api(avg:3.808): 60.92
  • debian-12-xfce_dispvm-preload-api(avg:3.576): 57.21
  • debian-12-xfce_dispvm-preload-less-api(avg:6.112): 97.80
  • debian-12-xfce_dispvm-preload-more-api(avg:3.883): 62.12
  • debian-12-xfce_dispvm-preload-gui-api(avg:5.073): 81.17
  • debian-12-xfce_dispvm-preload-concurrent-api(avg:2.939): 47.02
  • debian-12-xfce_dispvm-preload-gui-concurrent-api(avg:3.630): 58.09
  • debian-12-xfce_vm(avg:0.410): 6.56
  • debian-12-xfce_vm-gui(avg:0.512): 8.19
  • debian-12-xfce_vm-concurrent(avg:0.412): 6.58
  • debian-12-xfce_vm-gui-concurrent(avg:0.446): 7.13
  • debian-12-xfce_vm-api(avg:0.096): 1.54
  • debian-12-xfce_vm-gui-api(avg:0.124): 1.98
  • debian-12-xfce_vm-concurrent-api(avg:0.048): 0.77
  • debian-12-xfce_vm-gui-concurrent-api(avg:0.109): 1.75
  • fedora-42-xfce_dispvm(avg:7.218): 115.50
  • fedora-42-xfce_dispvm-gui(avg:8.632): 138.11
  • fedora-42-xfce_dispvm-concurrent(avg:3.771): 60.34
  • fedora-42-xfce_dispvm-gui-concurrent(avg:4.448): 71.17
  • fedora-42-xfce_dispvm-dom0(avg:7.791): 124.66
  • fedora-42-xfce_dispvm-dom0-gui(avg:9.187): 147.00
  • fedora-42-xfce_dispvm-dom0-concurrent(avg:3.948): 63.17
  • fedora-42-xfce_dispvm-dom0-gui-concurrent(avg:4.966): 79.45
  • fedora-42-xfce_dispvm-preload(avg:4.314): 69.02
  • fedora-42-xfce_dispvm-preload-gui(avg:4.907): 78.51
  • fedora-42-xfce_dispvm-preload-concurrent(avg:3.083): 49.33
  • fedora-42-xfce_dispvm-preload-gui-concurrent(avg:4.403): 70.44
  • fedora-42-xfce_dispvm-preload-dom0(avg:4.537): 72.59
  • fedora-42-xfce_dispvm-preload-dom0-gui(avg:5.851): 93.61
  • fedora-42-xfce_dispvm-preload-dom0-concurrent(avg:3.846): 61.53
  • fedora-42-xfce_dispvm-preload-dom0-gui-concurrent(avg:4.468): 71.48
  • fedora-42-xfce_dispvm-api(avg:7.845): 125.52
  • fedora-42-xfce_dispvm-gui-api(avg:9.496): 151.94
  • fedora-42-xfce_dispvm-concurrent-api(avg:3.985): 63.75
  • fedora-42-xfce_dispvm-gui-concurrent-api(avg:4.700): 75.20
  • fedora-42-xfce_dispvm-preload-api(avg:4.581): 73.29
  • fedora-42-xfce_dispvm-preload-less-api(avg:7.390): 118.23
  • fedora-42-xfce_dispvm-preload-more-api(avg:4.343): 69.48
  • fedora-42-xfce_dispvm-preload-gui-api(avg:5.629): 90.06
  • fedora-42-xfce_dispvm-preload-concurrent-api(avg:3.592): 57.47
  • fedora-42-xfce_dispvm-preload-gui-concurrent-api(avg:4.671): 74.73
  • fedora-42-xfce_vm(avg:0.594): 9.51
  • fedora-42-xfce_vm-gui(avg:0.575): 9.20
  • fedora-42-xfce_vm-concurrent(avg:0.538): 8.60
  • fedora-42-xfce_vm-gui-concurrent(avg:0.642): 10.27
  • fedora-42-xfce_vm-api(avg:0.145): 2.32
  • fedora-42-xfce_vm-gui-api(avg:0.147): 2.35
  • fedora-42-xfce_vm-concurrent-api(avg:0.095): 1.52
  • fedora-42-xfce_vm-gui-concurrent-api(avg:0.136): 2.18
  • whonix-workstation-17_dispvm(avg:8.013): 128.21
  • whonix-workstation-17_dispvm-gui(avg:9.209): 147.34
  • whonix-workstation-17_dispvm-concurrent(avg:4.063): 65.00
  • whonix-workstation-17_dispvm-dom0(avg:8.500): 136.00
  • whonix-workstation-17_dispvm-dom0-gui(avg:9.758): 156.12
  • whonix-workstation-17_dispvm-dom0-concurrent(avg:4.537): 72.59
  • whonix-workstation-17_dispvm-dom0-gui-concurrent(avg:5.497): 87.94
  • whonix-workstation-17_dispvm-preload(avg:7.518): 120.30
  • whonix-workstation-17_dispvm-preload-gui(avg:8.814): 141.02
  • whonix-workstation-17_dispvm-preload-concurrent(avg:4.179): 66.86
  • whonix-workstation-17_dispvm-preload-gui-concurrent(avg:5.023): 80.37
  • whonix-workstation-17_dispvm-preload-dom0(avg:5.230): 83.68
  • whonix-workstation-17_dispvm-preload-dom0-gui(avg:6.578): 105.25
  • whonix-workstation-17_dispvm-preload-dom0-concurrent(avg:4.470): 71.52
  • whonix-workstation-17_dispvm-preload-dom0-gui-concurrent(avg:5.596): 89.53
  • whonix-workstation-17_dispvm-api(avg:8.697): 139.16
  • whonix-workstation-17_dispvm-gui-api(avg:9.839): 157.43
  • whonix-workstation-17_dispvm-concurrent-api(avg:4.435): 70.95
  • whonix-workstation-17_dispvm-gui-concurrent-api(avg:5.121): 81.94
  • whonix-workstation-17_dispvm-preload-api(avg:5.173): 82.77
  • whonix-workstation-17_dispvm-preload-less-api(avg:8.282): 132.51
  • whonix-workstation-17_dispvm-preload-more-api(avg:5.682): 90.91
  • whonix-workstation-17_dispvm-preload-gui-api(avg:6.871): 109.94
  • whonix-workstation-17_dispvm-preload-concurrent-api(avg:4.766): 76.26
  • whonix-workstation-17_dispvm-preload-gui-concurrent-api(avg:5.657): 90.51
  • whonix-workstation-17_vm(avg:0.589): 9.43
  • whonix-workstation-17_vm-gui(avg:0.582): 9.32
  • whonix-workstation-17_vm-concurrent(avg:0.580): 9.28
  • whonix-workstation-17_vm-gui-concurrent(avg:0.629): 10.06
  • whonix-workstation-17_vm-api(avg:0.146): 2.34
  • whonix-workstation-17_vm-gui-api(avg:0.163): 2.61
  • whonix-workstation-17_vm-concurrent-api(avg:0.134): 2.15
  • whonix-workstation-17_vm-gui-concurrent-api(avg:0.160): 2.55

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.

Setting qubes-prefs default_netvm throws insufficient error when there is an affected running qube

2 participants