Skip to content

Conversation

alimirjamali
Copy link

@alimirjamali alimirjamali commented Apr 25, 2025

Checking for get_modified() within signal handler for changed signal
does not work for the 1st character (e.g. commenting a policy line)
as the output of get_modified() only changes after the signal handler.

fixes: QubesOS/qubes-issues#9911

@alimirjamali alimirjamali force-pushed the issue-9911-policy-1st-modification branch from d0ba4f3 to fc00fde Compare April 25, 2025 18:29
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.67%. Comparing base (203be8c) to head (be1f977).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #256   +/-   ##
=======================================
  Coverage   92.67%   92.67%           
=======================================
  Files          59       59           
  Lines       11267    11268    +1     
=======================================
+ Hits        10442    10443    +1     
  Misses        825      825           

☔ 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 Apr 28, 2025

OpenQA test summary

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

  • system_tests_kde_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_qwt_win10_seamless@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/0ZKG~-\d+-/...

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

  • 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_interactive@hw1

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-test-file' matc...
  • 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...

Failed tests

18 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_dispvm

  • system_tests_kde_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_qwt_win10_seamless@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/0ZKG~-\d+-/...

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

  • 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_interactive@hw1

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-test-file' matc...
  • 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...

Fixed failures

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

15 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_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) 'clipboard-paste-notif...
  • system_tests_audio

  • system_tests_whonix@hw7

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

    • whonixcheck: unnamed test (unknown)

  • system_tests_basic_vm_qrexec_gui_btrfs

    • TC_03_QvmRevertTemplateChanges: test_000_revert_linux (error)
      subprocess.CalledProcessError: Command '['sha1sum', '/var/lib/qubes...
  • system_tests_suspend@hw1

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

Unstable tests

Performance Tests

Performance degradation:

No issues

Remaining performance tests:

56 tests
  • debian-12-xfce_exec: 8.05
  • debian-12-xfce_exec-root: 29.22
  • debian-12-xfce_socket: 8.42
  • debian-12-xfce_socket-root: 8.54
  • debian-12-xfce_exec-data-simplex: 62.61
  • debian-12-xfce_exec-data-duplex: 72.56
  • debian-12-xfce_exec-data-duplex-root: 70.97
  • debian-12-xfce_socket-data-duplex: 159.99
  • fedora-41-xfce_exec: 9.36
  • fedora-41-xfce_exec-root: 60.53
  • fedora-41-xfce_socket: 8.88
  • fedora-41-xfce_socket-root: 8.18
  • fedora-41-xfce_exec-data-simplex: 67.65
  • fedora-41-xfce_exec-data-duplex: 68.44
  • fedora-41-xfce_exec-data-duplex-root: 107.11
  • fedora-41-xfce_socket-data-duplex: 149.47
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 133792.00
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 97261.00
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 151301.00
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 11895.00
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 14268.00
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 381.00
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 3304.00
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 3366.00
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 417260.00
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 128429.00
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 438551.00
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 144504.00
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 104934.00
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 8473.00
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7881.00
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 5086.00
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 381161.00
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 56087.00
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 317654.00
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 30795.00
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 84152.00
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3206.00
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8143.00
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 667.00
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 360087.00
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 96619.00
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 280442.00
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 65596.00
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 94426.00
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 1698.00
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8295.00
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1232.00
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 336621.00
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 171613.00
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 308677.00
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 86900.00
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 85009.00
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 5232.00
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8047.00
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 2424.00

@marmarta
Copy link
Member

marmarta commented May 6, 2025

Hm, I'd rather have here correct checking for changes then just ignoring it. Maybe there is another signal handler, or maybe this should be connected to 'modified-changed' signal?

Checking for `get_modified()` within signal handler for `changed` signal
does not work for the 1st character (e.g. commenting a policy line)
as the output of `get_modified()` only changes after the signal handler.

fixes: QubesOS/qubes-issues#9911
@alimirjamali alimirjamali force-pushed the issue-9911-policy-1st-modification branch from fc00fde to be1f977 Compare May 7, 2025 01:43
@alimirjamali
Copy link
Author

Hm, I'd rather have here correct checking for changes then just ignoring it. Maybe there is another signal handler, or maybe this should be connected to 'modified-changed' signal?

Just tested this. It will work fine if it is connected to both changed and modified-changed signals. Otherwise it will break test_detect_changes unittest. I guess it is fine if it is connected to both signals.

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.

Policy Editor (GUI) does not allow save until 2 characters have changed
4 participants