Skip to content

fix toputils: make it more robust to paths that contain _tops#14

Merged
marmarek merged 2 commits intoQubesOS:mainfrom
zaz:fix-toputils
May 18, 2025
Merged

fix toputils: make it more robust to paths that contain _tops#14
marmarek merged 2 commits intoQubesOS:mainfrom
zaz:fix-toputils

Conversation

@zaz
Copy link
Copy Markdown
Contributor

@zaz zaz commented May 7, 2025

Previously, the code was simply splitting paths by the text _tops/.

There were two errors:

  1. It was not checked first that the path started with _tops/ (only _tops).
  2. It would cut off paths that contain _tops/ because we were taking the first index of the split only, so _tops/this_is_not_a_tops/test.top would result in a relpath of _tops/this_is_not_a (cut off in the middle of the directory).

Fixes #9949.

Avoids IndexError from `relpath[1]`. Fixes #9949.
Comment thread _utils/toputils.py Outdated
@qubesos-bot
Copy link
Copy Markdown

qubesos-bot commented May 9, 2025

OpenQA test summary

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

  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_extra

    • TC_00_InputProxy_fedora-41-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_fedora-41-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_debian-12-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

  • 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_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/dcWzE-\d+-/...

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

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qui-devices-opened' m...
  • system_tests_guivm_gpu_gui_interactive@hw13

    • guivm_startup: unnamed test (unknown)
    • guivm_startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

Failed tests

24 failures
  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_extra

    • TC_00_InputProxy_fedora-41-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_fedora-41-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_debian-12-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

  • 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_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/dcWzE-\d+-/...

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

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qui-devices-opened' m...
  • system_tests_guivm_gpu_gui_interactive@hw13

    • guivm_startup: unnamed test (unknown)
    • guivm_startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

Fixed failures

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

14 fixed
  • system_tests_whonix

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

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_basic_vm_qrexec_gui

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)

    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qubes-website' matche...

    • clipboard_and_web: wait_serial (wait serial expected)
      # wait_serial expected: "lspci; echo 2E8vz-\$?-"...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-work' matched...
  • system_tests_audio

  • system_tests_whonix@hw7

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

    • whonixcheck: unnamed test (unknown)

Unstable tests

Details
  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw13

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...

Performance Tests

Performance degradation:

1 performance degradations
  • debian-12-xfce_exec: 8.59 :small_red_triangle_up: ( previous job: 7.12, degradation: 120.63%)

Remaining performance tests:

15 tests
  • debian-12-xfce_exec-root: 29.43 :small_red_triangle_up: ( previous job: 28.65, degradation: 102.69%)
  • debian-12-xfce_socket: 8.90 :small_red_triangle_up: ( previous job: 8.60, degradation: 103.41%)
  • debian-12-xfce_socket-root: 8.35 🟢 ( previous job: 8.52, improvement: 97.92%)
  • debian-12-xfce_exec-data-simplex: 76.23 :small_red_triangle_up: ( previous job: 71.62, degradation: 106.43%)
  • debian-12-xfce_exec-data-duplex: 75.71 :small_red_triangle_up: ( previous job: 70.34, degradation: 107.63%)
  • debian-12-xfce_exec-data-duplex-root: 85.71 :small_red_triangle_up: ( previous job: 82.72, degradation: 103.61%)
  • debian-12-xfce_socket-data-duplex: 166.48 :small_red_triangle_up: ( previous job: 156.96, degradation: 106.07%)
  • fedora-41-xfce_exec: 9.20 🟢 ( previous job: 9.27, improvement: 99.25%)
  • fedora-41-xfce_exec-root: 61.37 🟢 ( previous job: 61.51, improvement: 99.78%)
  • fedora-41-xfce_socket: 8.19 🟢 ( previous job: 8.63, improvement: 94.89%)
  • fedora-41-xfce_socket-root: 8.36 🟢 ( previous job: 8.71, improvement: 95.99%)
  • fedora-41-xfce_exec-data-simplex: 64.07 🟢 ( previous job: 75.53, improvement: 84.82%)
  • fedora-41-xfce_exec-data-duplex: 69.18 🟢 ( previous job: 71.56, improvement: 96.68%)
  • fedora-41-xfce_exec-data-duplex-root: 92.75 🟢 ( previous job: 109.13, improvement: 85.00%)
  • fedora-41-xfce_socket-data-duplex: 155.63 :small_red_triangle_up: ( previous job: 150.61, degradation: 103.33%)

Previously, `_tops/this_is_not_tops/test.top` would result in a relpath
of `_tops/this_is_not` (cut off in the middle of a directory name).
@marmarek marmarek merged commit bc060b2 into QubesOS:main May 18, 2025
2 of 3 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.

qubesctl top.enabled throws IndexError if you create dir _tops<something>

3 participants