qubes-core-agent-linux
qubes-core-agent-linux copied to clipboard
setup-ip: Invoke 'ip' via $PATH
Debian recently 1 removed the symlink in /sbin which breaks our setup-ip script.
Instead of hardcoding the new path, rely on normal $PATH resolution. Saving a few file existence checks isn't worth such breakage, I think (or if that really matters here, shell is the wrong tool in the first place).
Assuming you agree with my reasoning above, one could argue to apply this change to all invocations of programs normally in the $PATH. Given that usage was already inconsistent I for now kept the change minimal instead.
The fix (this version or an update to /bin/ip) should be backported to 4.2.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.14%. Comparing base (
0f346ad) to head (08fe31f).
Additional details and impacted files
@@ Coverage Diff @@
## main #516 +/- ##
==========================================
- Coverage 70.57% 70.14% -0.43%
==========================================
Files 3 3
Lines 469 469
==========================================
- Hits 331 329 -2
- Misses 138 140 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For tools normally in /bin (or similar), I would agree that calling by just name is okay. But for tools in /sbin (or similar), better not, ironically exactly because of Debian - as (/usr)/sbin is not in default $PATH. And this happens to be an issue also in various service contexts (like user systemd units), but also for scripts/tools used as normal users (for example modinfo really doesn't need to be called as root).
Ah, good point. While I'm not sure it's the tradeoff [1] I prefer that's a valid reason. Would you like a more neutral commit message? (Didn't just push one, since you already added the openqa-pending label)
[1]: For example it makes local overrides with /usr/local or similar harder.
Yes, you can update commit message. I've recently added better reporting which commit was used by openqa, so there is no reason to avoid (especially non-functional) changes when label is already added (at worst, the test will need to be repeated, but if some changes needing re-tested are necessary, that would be the case anyway).
And BTW, on Fedora there is only /usr/sbin/ip, but no /usr/bin/ip, so with the symlink in Debian gone, there is no full path that would work on both anymore...
And BTW, on Fedora there is only
/usr/sbin/ip, but no/usr/bin/ip, so with the symlink in Debian gone, there is no full path that would work on both anymore...
Ah well, then relying on $PATH is clearly the easiest solution.
Yes, you can update commit message. I've recently added better reporting which commit was used by openqa, so there is no reason to avoid (especially non-functional) changes when label is already added (at worst, the test will need to be repeated, but if some changes needing re-tested are necessary, that would be the case anyway).
Good to know. Wasn't sure if I would abort and/or trigger a retest, which would be undesirable for an edited commit message.
Pushed updated commit message.
OpenQA test summary
Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024080713-4.3&flavor=pull-requests
Test run included the following:
- https://github.com/QubesOS/qubes-core-agent-linux/pull/513 (https://github.com/QubesOS/qubes-core-agent-linux/pull/513/commits/e17c186fb2fbf400b91ac0b481e9c539b059fcf6)
- https://github.com/QubesOS/qubes-core-admin/pull/574 (https://github.com/QubesOS/qubes-core-admin/pull/574/commits/8039442a401b6c5cc587f3cb81fcf62211991e60)
- https://github.com/QubesOS/qubes-artwork/pull/41 (https://github.com/QubesOS/qubes-artwork/pull/41/commits/2148dce353f89b87cdd6d757b94bd76e7279860f)
- https://github.com/QubesOS/qubes-gui-daemon/pull/145 (https://github.com/QubesOS/qubes-gui-daemon/pull/145/commits/c6acd17926f11f11d9d8672a55c86f514b0be5f7)
- https://github.com/QubesOS/qubes-core-agent-linux/pull/516 (https://github.com/QubesOS/qubes-core-agent-linux/pull/516/commits/08fe31f58d88e858a8c0a3f220f2934b7cc7d949)
- https://github.com/QubesOS/qubes-core-admin/pull/608 (https://github.com/QubesOS/qubes-core-admin/pull/608/commits/226805d32532f4a46aaf74075d0028ad8c852146)
- https://github.com/QubesOS/qubes-gui-agent-linux/pull/197 (https://github.com/QubesOS/qubes-gui-agent-linux/pull/197/commits/fc04d11888ed704de4888fc95357c1161c36cea7)
- https://github.com/QubesOS/qubes-core-qrexec/pull/135 (https://github.com/QubesOS/qubes-core-qrexec/pull/135/commits/62ce536eebf5e7671c90d5cb0f165b6cff853d8f)
- https://github.com/QubesOS/qubes-video-companion/pull/28 (https://github.com/QubesOS/qubes-video-companion/pull/28/commits/97a6dde9bf6720119f7ddb7d1125f0f4e789ec50)
- https://github.com/QubesOS/qubes-core-qrexec/pull/172 (https://github.com/QubesOS/qubes-core-qrexec/pull/172/commits/45527be327695c56e96a2e36d8ecb6d82ffd9205)
- https://github.com/QubesOS/qubes-core-agent-linux/pull/517 (https://github.com/QubesOS/qubes-core-agent-linux/pull/517/commits/d993b424c4b1758b999194ff6a02470f14803692)
New failures, excluding unstable
Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024070519-4.3&flavor=update
-
system_tests_pvgrub_salt_storage
-
TC_41_HVMGrub_debian-12-xfce: test_000_standalone_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... -
TC_41_HVMGrub_debian-12-xfce: test_010_template_based_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
-
-
system_tests_extra
- TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0
- TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
-
system_tests_usbproxy
- TC_20_USBProxy_core3_whonix-gateway-17: test_070_attach_not_installed_front (error)
qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
- TC_20_USBProxy_core3_whonix-gateway-17: test_070_attach_not_installed_front (error)
-
system_tests_network_updates
-
VmUpdates_debian-12-xfce: test_020_updates_available_notification (error)
subprocess.CalledProcessError: Command '/usr/lib/qubes/upgrades-sta... -
VmUpdates_debian-12-xfce: test_120_updates_available_notification_qubes_vm_update (error)
subprocess.CalledProcessError: Command '/usr/lib/qubes/upgrades-sta...
-
Failed tests
9 failures
-
system_tests_pvgrub_salt_storage
-
TC_41_HVMGrub_debian-12-xfce: test_000_standalone_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... -
TC_41_HVMGrub_debian-12-xfce: test_010_template_based_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... -
[unstable] TC_41_HVMGrub_fedora-40-xfce: test_000_standalone_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... -
TC_41_HVMGrub_fedora-40-xfce: test_010_template_based_vm (error)
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
-
-
system_tests_extra
-
[unstable] TC_00_QVCTest_debian-12-xfce: test_020_webcam (failure)
self.assertEqual(len(img1), len(... AssertionError: 12441600 != 460800 -
TC_00_QVCTest_whonix-gateway-17: test_010_screenshare (failure)
self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0
-
-
system_tests_usbproxy
- TC_20_USBProxy_core3_whonix-gateway-17: test_070_attach_not_installed_front (error)
qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
- TC_20_USBProxy_core3_whonix-gateway-17: test_070_attach_not_installed_front (error)
-
system_tests_network_updates
-
VmUpdates_debian-12-xfce: test_020_updates_available_notification (error)
subprocess.CalledProcessError: Command '/usr/lib/qubes/upgrades-sta... -
VmUpdates_debian-12-xfce: test_120_updates_available_notification_qubes_vm_update (error)
subprocess.CalledProcessError: Command '/usr/lib/qubes/upgrades-sta...
-
Fixed failures
Compared to: https://openqa.qubes-os.org/tests/105374#dependencies
7 fixed
-
system_tests_splitgpg
-
TC_10_Thunderbird_debian-12-xfce: test_010_send_receive_inline_signed_only (failure)
dogtail.tree.SearchError: descendent of [application | Thunderbird]... -
TC_10_Thunderbird_whonix-workstation-17: test_020_send_receive_inline_with_attachment (failure)
dogtail.tree.SearchError: descendent of [application | Thunderbird]...
-
-
system_tests_extra
-
TC_00_QVCTest_fedora-40-xfce: test_020_webcam (failure + cleanup)
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... -
TC_00_QVCTest_whonix-gateway-17: test_020_webcam (failure + cleanup)
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... -
TC_00_QVCTest_whonix-workstation-17: test_020_webcam (failure + cleanup)
AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
-
-
system_tests_usbproxy
- TC_20_USBProxy_core3_fedora-40-xfce: test_070_attach_not_installed_front (error)
qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
- TC_20_USBProxy_core3_fedora-40-xfce: test_070_attach_not_installed_front (error)
-
system_tests_network_updates
- TC_11_QvmTemplateMgmtVM_debian-12-xfce: test_000_template_list (failure)
AssertionError: libvirt event impl drain timeout
- TC_11_QvmTemplateMgmtVM_debian-12-xfce: test_000_template_list (failure)
Unstable tests
-
system_tests_audio@hw1
TC_20_AudioVM_PipeWire_whonix-workstation-17/test_226_audio_playback_pipewire (1/5 times with errors)
- job 107016
AssertionError: too short audio, expected 10s, got 9.09077097505668...
- job 107016
-
system_tests_whonix@hw7
whonix_torbrowser/ (1/5 times with errors)
- job 108052
None
whonix_torbrowser/ (1/5 times with errors)
- job 108052
None
whonix_torbrowser/Failed (1/5 times with errors)
- job 108052
# Test died: no candidate needle with tag(s) 'tor-browser-ipcheck-o...
- job 108052
-
system_tests_suspend@hw1
suspend/ (1/5 times with errors)
- job 107593
None
suspend/Failed (1/5 times with errors)
- job 107593
# Test died: no candidate needle with tag(s) 'xscreensaver-prompt' ...
suspend/wait_serial (1/5 times with errors)
- job 107593
# wait_serial expected: qr/2E8vz-\d+-/...
- job 107593
-
system_tests_whonix
whonix_torbrowser/ (1/5 times with errors)
- job 108052
None
whonix_torbrowser/ (1/5 times with errors)
- job 108052
None
whonix_torbrowser/Failed (1/5 times with errors)
- job 108052
# Test died: no candidate needle with tag(s) 'tor-browser-ipcheck-o...
- job 108052
-
system_tests_suspend
suspend/ (1/5 times with errors)
- job 107593
None
suspend/Failed (1/5 times with errors)
- job 107593
# Test died: no candidate needle with tag(s) 'xscreensaver-prompt' ...
suspend/wait_serial (1/5 times with errors)
- job 107593
# wait_serial expected: qr/2E8vz-\d+-/...
- job 107593
-
system_tests_pvgrub_salt_storage
TC_41_HVMGrub_fedora-40-xfce/test_000_standalone_vm (4/5 times with errors)
- job 105874
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... - job 106585
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... - job 107590
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco... - job 108080
qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
- job 105874
-
system_tests_splitgpg
TC_10_Thunderbird_whonix-workstation-17/test_020_send_receive_inline_with_attachment (2/5 times with errors)
- job 105876
dogtail.tree.SearchError: descendent of [application | Thunderbird]... - job 106587
dogtail.tree.SearchError: descendent of [application | Thunderbird]...
- job 105876
-
system_tests_extra
TC_00_QVCTest_debian-12-xfce/test_020_webcam (1/5 times with errors)
- job 107031
AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
TC_00_QVCTest_fedora-40-xfce/test_020_webcam (4/5 times with errors)
- job 105868
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 106579
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 107031
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 108074
AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
TC_00_QVCTest_whonix-gateway-17/test_020_webcam (5/5 times with errors)
- job 105868
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 106579
self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0 - job 107031
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 107584
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 108074
AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
TC_00_QVCTest_whonix-workstation-17/test_020_webcam (3/5 times with errors)
- job 105868
AssertionError: 'qubes-video-companion webcam' exited early (0): b'... - job 106579
self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0 - job 107031
AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
- job 107031
-
system_tests_network_updates
TC_10_QvmTemplate_whonix-gateway-17/test_010_template_install (1/5 times with errors)
- job 105873
AssertionError: libvirt event impl drain timeout
- job 105873
-
system_tests_audio
TC_20_AudioVM_PipeWire_whonix-workstation-17/test_226_audio_playback_pipewire (1/5 times with errors)
- job 107016
AssertionError: too short audio, expected 10s, got 9.09077097505668...
- job 107016
-
system_tests_basic_vm_qrexec_gui_ext4
TC_20_NonAudio_whonix-workstation-17-pool/test_115_qrexec_filecopy_no_agent (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
TC_20_NonAudio_whonix-workstation-17-pool/test_130_qrexec_filemove_disk_full (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
TC_20_NonAudio_whonix-workstation-17-pool/test_140_qrexec_filecopy_unsafe_name (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
TC_20_NonAudio_whonix-workstation-17-pool/test_141_qrexec_filecopy_unsafe_symlink (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
TC_20_NonAudio_whonix-workstation-17-pool/test_200_timezone (1/5 times with errors)
- job 108693
None
TC_20_NonAudio_whonix-workstation-17-pool/test_210_time_sync (1/5 times with errors)
- job 108693
None
TC_20_NonAudio_whonix-workstation-17-pool/test_250_resize_private_img (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
TC_20_NonAudio_whonix-workstation-17-pool/test_300_bug_1028_gui_memory_pinning (1/5 times with errors)
- job 108693
libvirt.libvirtError: internal error: libxenlight failed to create ...
- job 108693