Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/audio: set and reload stubdom pulseaudio module #589

Merged
merged 3 commits into from May 14, 2024

Conversation

fepitre
Copy link
Member

@fepitre fepitre commented May 3, 2024

Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 45.00000% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 68.28%. Comparing base (fe73227) to head (dbc3b8f).
Report is 9 commits behind head on main.

Files Patch % Lines
qubes/ext/audio.py 45.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #589      +/-   ##
==========================================
- Coverage   68.50%   68.28%   -0.23%     
==========================================
  Files          56       56              
  Lines       11232    11277      +45     
==========================================
+ Hits         7695     7701       +6     
- Misses       3537     3576      +39     
Flag Coverage Δ
unittests 68.28% <45.00%> (-0.23%) ⬇️

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.

@marmarek
Copy link
Member

marmarek commented May 4, 2024

Tests failed here. My guess is missing dom0 in the app.domains mock collection (and default_audiovm defaults to dom0).

@qubesos-bot
Copy link

qubesos-bot commented May 4, 2024

OpenQA test summary

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

New failures, excluding unstable

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

  • system_tests_extra
    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0

Failed tests

8 failures
  • system_tests_pvgrub_salt_storage

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

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

  • system_tests_splitgpg

  • system_tests_extra

    • [unstable] TC_00_QVCTest_debian-12-xfce: test_020_webcam (failure)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

    • [unstable] TC_00_QVCTest_fedora-39-xfce: test_020_webcam (failure)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

    • TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
      self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0

    • [unstable] TC_00_QVCTest_whonix-gateway-17: test_020_webcam (failure)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

    • [unstable] TC_00_QVCTest_whonix-workstation-17: test_020_webcam (failure)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

Fixed failures

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

1 fixed
  • system_tests_dispvm

Unstable tests

  • system_tests_basic_vm_qrexec_gui@hw1

    TC_20_AudioVM_Pulse_whonix-workstation-17/test_220_audio_play_pulseaudio (2/5 times with errors)
    • job 97185 AssertionError: only silence detected, no useful audio data
    • job 97620 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_222_audio_rec_unmuted_pulseaudio (2/5 times with errors)
    • job 97185 AssertionError: only silence detected, no useful audio data
    • job 97620 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce/test_223_audio_play_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce/test_223_audio_play_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce/test_225_audio_rec_unmuted_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_PipeWire_debian-12-xfce/test_250_audio_playback_audiovm_pipewire (1/5 times with errors)
    • job 98601 AssertionError: only silence detected, no useful audio data
  • system_tests_basic_vm_qrexec_gui

    TC_20_AudioVM_Pulse_whonix-workstation-17/test_220_audio_play_pulseaudio (2/5 times with errors)
    • job 97185 AssertionError: only silence detected, no useful audio data
    • job 97620 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_222_audio_rec_unmuted_pulseaudio (2/5 times with errors)
    • job 97185 AssertionError: only silence detected, no useful audio data
    • job 97620 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce/test_223_audio_play_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce/test_223_audio_play_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce/test_225_audio_rec_unmuted_hvm (2/5 times with errors)
    • job 97620 AssertionError: only silence detected, no useful audio data
    • job 98341 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_PipeWire_debian-12-xfce/test_250_audio_playback_audiovm_pipewire (1/5 times with errors)
    • job 98601 AssertionError: only silence detected, no useful audio data
  • system_tests_network

    VmNetworking_debian-12-xfce/test_010_simple_proxyvm (1/5 times with errors)
    • job 99274 subprocess.CalledProcessError: Command 'qubes.WaitForSession' retur...
  • system_tests_pvgrub_salt_storage

    TC_41_HVMGrub_debian-12-xfce/test_000_standalone_vm (3/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_41_HVMGrub_fedora-39-xfce/test_000_standalone_vm (4/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 98613 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_42_PVHGrub_fedora-39-xfce/test_000_standalone_vm (3/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_41_HVMGrub_debian-12-xfce/test_010_template_based_vm (3/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_41_HVMGrub_fedora-39-xfce/test_010_template_based_vm (4/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 98613 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_42_PVHGrub_fedora-39-xfce/test_010_template_based_vm (3/5 times with errors)
    • job 96359 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97092 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    • job 97197 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
  • system_tests_splitgpg

    TC_10_Thunderbird_fedora-39-xfce/test_000_send_receive_default (3/5 times with errors)
    • job 97094 Exception: Failed to send message with error 'unknown'
    • job 97199 Exception: Failed to send message with error 'unknown'
    • job 97634 Exception: Failed to send message with error 'unknown'
    TC_10_Thunderbird_fedora-39-xfce/test_010_send_receive_inline_signed_only (3/5 times with errors)
    • job 97094 Exception: Failed to send message with error 'unknown'
    • job 97199 Exception: Failed to send message with error 'unknown'
    • job 97634 Exception: Failed to send message with error 'unknown'
    TC_10_Thunderbird_fedora-39-xfce/test_020_send_receive_inline_with_attachment (3/5 times with errors)
    • job 97094 Exception: Failed to send message with error 'unknown'
    • job 97199 Exception: Failed to send message with error 'unknown'
    • job 97634 Exception: Failed to send message with error 'unknown'
  • system_tests_extra

    TC_00_QVCTest_debian-12-xfce/test_020_webcam (1/5 times with errors)
    • job 99260 self.assertTrue(frame)... AssertionError: b'' is not true
    TC_00_QVCTest_fedora-39-xfce/test_020_webcam (1/5 times with errors)
    • job 99260 self.assertEqual(len(img1), len(img2))... AssertionError: 2359296 != 0
    TC_00_QVCTest_whonix-gateway-17/test_020_webcam (1/5 times with errors)
    • job 98336 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    TC_00_QVCTest_whonix-workstation-17/test_020_webcam (1/5 times with errors)
    • job 98596 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
  • system_tests_usbproxy

    TC_20_USBProxy_core3_whonix-gateway-17/test_070_attach_not_installed_front (1/5 times with errors)
    • job 97173 qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
    TC_20_USBProxy_core3_whonix-workstation-17/test_070_attach_not_installed_front (1/5 times with errors)
    • job 98333 qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
    TC_20_USBProxy_core3_debian-12-xfce/test_090_attach_stubdom (2/5 times with errors)
    • job 97608 AssertionError: 1 != 0 : Device connection failed
    • job 98333 AssertionError: 1 != 0 : Device connection failed
    TC_20_USBProxy_core3_fedora-39-xfce/test_090_attach_stubdom (2/5 times with errors)
    • job 97608 AssertionError: 1 != 0 : Device connection failed
    • job 98333 AssertionError: 1 != 0 : Device connection failed
  • system_tests_network_ipv6

    VmIPv6Networking_debian-12-xfce/test_031_firewall_dynamic_block (1/5 times with errors)
    • job 97090 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError
    VmIPv6Networking_fedora-39-xfce/test_031_firewall_dynamic_block (1/5 times with errors)
    • job 97090 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... AssertionError
  • system_tests_dispvm

    TC_20_DispVM_fedora-39-xfce/test_100_open_in_dispvm (4/5 times with errors)
    • job 97625 AssertionError: Timeout waiting for editor window
    • job 98346 AssertionError: Timeout waiting for editor window
    • job 98606 AssertionError: Timeout waiting for editor window
    • job 99270 AssertionError: './open-file test.txt' failed with ./open-file test...
  • system_tests_basic_vm_qrexec_gui_btrfs

    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_220_audio_play_pulseaudio (4/5 times with errors)
    • job 96348 AssertionError: only silence detected, no useful audio data
    • job 97081 AssertionError: only silence detected, no useful audio data
    • job 97186 AssertionError: only silence detected, no useful audio data
    • job 97621 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_222_audio_rec_unmuted_pulseaudio (4/5 times with errors)
    • job 96348 AssertionError: only silence detected, no useful audio data
    • job 97081 AssertionError: only silence detected, no useful audio data
    • job 97186 AssertionError: only silence detected, no useful audio data
    • job 97621 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (1/5 times with errors)
    • job 97621 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_223_audio_play_hvm (1/5 times with errors)
    • job 97621 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_225_audio_rec_unmuted_hvm (1/5 times with errors)
    • job 97621 AssertionError: only silence detected, no useful audio data
  • system_tests_basic_vm_qrexec_gui_ext4

    TC_00_Basic/test_141_libvirt_objects_reconnect (1/5 times with errors)
    • job 98343 AssertionError: libvirt event impl drain timeout
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_220_audio_play_pulseaudio (3/5 times with errors)
    • job 97082 AssertionError: only silence detected, no useful audio data
    • job 97187 AssertionError: only silence detected, no useful audio data
    • job 97622 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_222_audio_rec_unmuted_pulseaudio (3/5 times with errors)
    • job 97082 AssertionError: only silence detected, no useful audio data
    • job 97187 AssertionError: only silence detected, no useful audio data
    • job 97622 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (2/5 times with errors)
    • job 97622 AssertionError: only silence detected, no useful audio data
    • job 98343 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_223_audio_play_hvm (2/5 times with errors)
    • job 97622 AssertionError: only silence detected, no useful audio data
    • job 98343 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_225_audio_rec_unmuted_hvm (2/5 times with errors)
    • job 97622 AssertionError: only silence detected, no useful audio data
    • job 98343 AssertionError: only silence detected, no useful audio data
  • system_tests_basic_vm_qrexec_gui_zfs

    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_220_audio_play_pulseaudio (3/5 times with errors)
    • job 97096 AssertionError: only silence detected, no useful audio data
    • job 97175 AssertionError: only silence detected, no useful audio data
    • job 97636 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_222_audio_rec_unmuted_pulseaudio (3/5 times with errors)
    • job 97096 AssertionError: only silence detected, no useful audio data
    • job 97175 AssertionError: only silence detected, no useful audio data
    • job 97636 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (2/5 times with errors)
    • job 97636 AssertionError: only silence detected, no useful audio data
    • job 98335 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_223_audio_play_hvm (2/5 times with errors)
    • job 97636 AssertionError: only silence detected, no useful audio data
    • job 98335 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_225_audio_rec_unmuted_hvm (2/5 times with errors)
    • job 97636 AssertionError: only silence detected, no useful audio data
    • job 98335 AssertionError: only silence detected, no useful audio data
  • system_tests_network_updates

    TC_10_QvmTemplate_fedora-39-xfce/test_010_template_install (1/5 times with errors)
    • job 97631 AssertionError: libvirt event impl drain timeout
    TC_10_QvmTemplate_whonix-gateway-17/test_010_template_install (1/5 times with errors)
    • job 97201 AssertionError: libvirt event impl drain timeout
  • system_tests_basic_vm_qrexec_gui_xfs

    TC_20_NonAudio_fedora-39-xfce-pool/test_000_start_shutdown (1/5 times with errors)
    • job 99268 raise exceptions.TimeoutError() from exc... TimeoutError
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_220_audio_play_pulseaudio (1/5 times with errors)
    • job 99268 raise exceptions.TimeoutError() from exc... TimeoutError
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_220_audio_play_pulseaudio (2/5 times with errors)
    • job 97188 AssertionError: only silence detected, no useful audio data
    • job 97623 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_222_audio_rec_unmuted_pulseaudio (2/5 times with errors)
    • job 97188 AssertionError: only silence detected, no useful audio data
    • job 97623 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (3/5 times with errors)
    • job 97623 AssertionError: only silence detected, no useful audio data
    • job 98344 AssertionError: only silence detected, no useful audio data
    • job 99268 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_223_audio_play_hvm (2/5 times with errors)
    • job 97623 AssertionError: only silence detected, no useful audio data
    • job 98344 AssertionError: only silence detected, no useful audio data
    TC_20_AudioVM_Pulse_fedora-39-xfce-pool/test_225_audio_rec_unmuted_hvm (2/5 times with errors)
    • job 97623 AssertionError: only silence detected, no useful audio data
    • job 98344 AssertionError: only silence detected, no useful audio data

@fepitre
Copy link
Member Author

fepitre commented May 5, 2024

app.domains

I fixed it and added a specific test with audiovm not being dom0 in xml.

subject.log.warning("Cannot change dynamically audiovm: qrexec"
" is not available (stubdom-qrexec feature)")
if has_audio_model and has_stubdom_qrexec:
subject.log.warning(f"setting {newvalue.xid}")
Copy link
Member

Choose a reason for hiding this comment

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

Leftover debug message? But if it should stay, make it not explode on None as newvalue, and make more informative (at least mention it's about audiovm).

Copy link
Member Author

Choose a reason for hiding this comment

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

it's a leftover sorry.

async def set_stubdom_audiovm_domid(qube, audiovm):
try:
await qube.run_service_for_stdio(
f"qubes.SetAudioVM+{audiovm.xid}",
Copy link
Member

Choose a reason for hiding this comment

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

This fails if audiovm is None.

{% if vm.audiovm is defined %}
{% set audiovm_xid = vm.audiovm.xid %}
{% else %}
{% set audiovm_xid = 0 %}
Copy link
Member

Choose a reason for hiding this comment

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

Should this really default to 0 (dom0)? I'd say setting audiovm to None should result in some dummy value here (-1? empty?) which then avoids loading the vchan module (so only the null one is loaded). But setting audiovm to something later should still work.

But that's a minor issue. If you prefer to do that later, it's okay, but open an issue to not forget.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll set it to -1 so I need to adapt the stubdom part to not load module on start.

@fepitre fepitre force-pushed the devel20240503 branch 2 times, most recently from 59dd4a8 to b2e28e0 Compare May 7, 2024 10:49
@fepitre fepitre force-pushed the devel20240503 branch 2 times, most recently from 410ea8e to 913dcb8 Compare May 10, 2024 13:25
@@ -179,13 +184,13 @@
{% endif %}
{% if vm.netvm %}
Copy link
Member

Choose a reason for hiding this comment

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

This all is added only if netvm is set. You need to add a case for no-netvm too.

@marmarek
Copy link
Member

PipelineRetry

@marmarek
Copy link
Member

While I like it now, CI doesn't. Pylint complains and some tests need an update...

@marmarek
Copy link
Member

PipelineRetry

@marmarek marmarek merged commit e481d0e into QubesOS:main May 14, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants