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

apt unit test failing when running on > Ubuntu 24.04 or debian sid #6028

Open
dnegreira opened this issue Sep 13, 2024 · 0 comments · May be fixed by #6029
Open

apt unit test failing when running on > Ubuntu 24.04 or debian sid #6028

dnegreira opened this issue Sep 13, 2024 · 0 comments · May be fixed by #6029
Labels

Comments

@dnegreira
Copy link

Describe the bug

As part of the packaging effort for Debian on #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.

@dnegreira dnegreira added the bug label Sep 13, 2024
dnegreira added a commit to dnegreira/avocado that referenced this issue Sep 13, 2024
The unit test was failing on recent versions of Debian and Ubuntu
because the `login` package is no longer installing the binary on
`/bin/login` but rather on `/usr/bin/login`.

We have added a function which will retrieve the binary path depending
on the distro as well.

Resolves: avocado-framework#6028

Signed-off-by: David Negreira <[email protected]>
dnegreira added a commit to dnegreira/avocado that referenced this issue Sep 13, 2024
The unit test was failing on recent versions of Debian and Ubuntu
because the `login` package is no longer installing the binary on
`/bin/login` but rather on `/usr/bin/login`.

We have added a function which will retrieve the binary path depending
on the distro as well.

Resolves: avocado-framework#6028

Signed-off-by: David Negreira <[email protected]>
@dnegreira dnegreira linked a pull request Sep 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

1 participant