avocado
avocado copied to clipboard
apt unit test failing when running on > Ubuntu 24.04 or debian sid
Describe the bug
As part of the packaging effort for Debian on https://github.com/avocado-framework/avocado/pull/5912, we have found that a unit test is failing on more recent distro versions of Ubuntu/Debian.
RESULTS : PASS 654 | ERROR 0 | FAIL 1 | SKIP 23 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 70.23 s
Log file "debug.log" content for test "unit-644-selftests/unit/utils/software_manager.py:Apt.test_provides" (FAIL):
[stdout] ======================================================================
[stdout] FAIL: test_provides (software_manager.Apt.test_provides)
[stdout] ----------------------------------------------------------------------
[stdout] Traceback (most recent call last):
[stdout] File "/root/git/avocado/selftests/unit/utils/software_manager.py", line 21, in test_provides
[stdout] self.assertEqual(sm.provides("/bin/login"), "login")
[stdout] AssertionError: None != 'login'
[stdout]
[stdout] ----------------------------------------------------------------------
[stdout] Ran 1 test in 6.036s
[stdout]
[stdout] FAILED (failures=1)
This is because on more recent distros, the login
package does not install on /bin/login
but rather on /usr/bin/login
╰─$ dpkg -S login | grep /bin/login
systemd: /usr/bin/loginctl
login: /usr/bin/login
Steps to reproduce Run the unit tests on a Ubuntu 24.04 or Debian/sid distro.
Expected behavior Unit test to pass.
Current behavior Error.
System information (please complete the following information):
- OS:
lsb_release -a
root@dev-avocado-debiansid:~/git/avocado# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux trixie/sid
Release: n/a
Codename: trixie
and
╰─$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
- Avocado version:
git latest master
- Avocado installation method: git
Additional information I am currently working on fixing the unit test for code review, will submit it in a bit.