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

tests: Determine source package dynamically in test_run_crash_kernel #19

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Oct 7, 2022

The autopkgtest for apport 2.23.1-0ubuntu1 fails on ppc64el:

======================================================================
FAIL: test_run_crash_kernel (tests.integration.test_ui.T)
run_crash() for a kernel error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
  File "tests/integration/test_ui.py", line 1617, in test_run_crash_kernel
    self.assertEqual(
AssertionError: 'http://linux.bugs.example.com/5' != 'http://linux-signed.bugs.example.com/5'
- http://linux.bugs.example.com/5
+ http://linux-signed.bugs.example.com/5
? +++++++

----------------------------------------------------------------------

Sometimes the Linux source package is linux and sometimes linux-signed. Instead of hard-coding the source package name, determine it dynamically on the running system.

Bug: https://launchpad.net/bugs/1992172

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Merging #19 (5c7eb2d) into main (28af6c9) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   79.75%   79.78%   +0.02%     
==========================================
  Files          77       77              
  Lines       17183    17182       -1     
==========================================
+ Hits        13705    13708       +3     
+ Misses       3478     3474       -4     
Impacted Files Coverage Δ
tests/integration/test_ui.py 96.25% <100.00%> (+0.07%) ⬆️
tests/integration/test_signal_crashes.py 87.09% <0.00%> (+0.56%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bdrung bdrung marked this pull request as draft October 7, 2022 15:55
The autopkgtest for apport 2.23.1-0ubuntu1 fails on ppc64el:

```
======================================================================
FAIL: test_run_crash_kernel (tests.integration.test_ui.T)
run_crash() for a kernel error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
  File "tests/integration/test_ui.py", line 1617, in test_run_crash_kernel
    self.assertEqual(
AssertionError: 'http://linux.bugs.example.com/5' != 'http://linux-signed.bugs.example.com/5'
- http://linux.bugs.example.com/5
+ http://linux-signed.bugs.example.com/5
? +++++++

----------------------------------------------------------------------
```

Sometimes the Linux source package is `linux` and sometimes
`linux-signed`. Instead of hard-coding the source package name,
determine it dynamically on the running system.

Bug: https://launchpad.net/bugs/1992172
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
@bdrung bdrung marked this pull request as ready for review October 7, 2022 16:05
@schopin-pro schopin-pro merged commit a77a277 into main Oct 18, 2022
@bdrung bdrung deleted the fix-test_run_crash_kernel branch October 18, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants