apt_dpkg: fix GDB command for amd64 sandbox on non-amd64#600
Open
bdrung wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
==========================================
- Coverage 84.54% 84.53% -0.02%
==========================================
Files 104 104
Lines 21028 21013 -15
Branches 3219 3216 -3
==========================================
- Hits 17779 17763 -16
Misses 2809 2809
- Partials 440 441 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
`test_retrace_jammy_sandbox` fails on non-amd64 (e.g. on arm64): ``` $ pytest tests/system/test_apport_retrace.py::test_retrace_jammy_sandbox [...] /usr/lib/python3.14/subprocess.py:578: CalledProcessError --------------------------- Captured stdout call --------------------------- Get:1 http://de.archive.ubuntu.com/ubuntu jammy InRelease [270 kB] Get:2 http://de.archive.ubuntu.com/ubuntu jammy/main Sources [1340 kB] Get:3 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1395 kB] Get:4 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Components [423 kB] Get:5 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 c-n-f Metadata [30.3 kB] Fetched 3458 kB in 0s (0 B/s) Fetched 0 B in 0s (0 B/s) Extracting downloaded debs... dynamically loaded /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 needs package libc6, queueing dynamically loaded /usr/lib/x86_64-linux-gnu/libc.so.6 needs package libc6, queueing Installing extra package coreutils to get ExecutablePath Get:1 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 libc6 amd64 2.35-0ubuntu3 [3235 kB] Get:2 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 coreutils amd64 8.32-4.1ubuntu1 [1438 kB] Get:3 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 libc6-dbg amd64 2.35-0ubuntu3 [13.9 MB] Get:4 [6087 kB] Fetched 24.7 MB in 0s (0 B/s) Extracting downloaded debs... --------------------------- Captured stderr call --------------------------- ERROR: [Errno 2] No such file or directory: '/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2' ``` Avoid calling binaries from other architectures to determine the library search path. So add a hard-coded mapping from the Debian architecture to the multi-arch triplet instead. Extent `get_library_paths` to take an optional `architecture` parameter which returns the default value from ld.so. The dpkg-dev dependency can be dropped for the integration tests, because `dpkg-architecture` is not called any more. Bug: https://launchpad.net/bugs/2150427
The method `get_native_multiarch_triplet` was introduced in commit bd9e862 ("report: gdb_command: don't hardcode the GNU triplet for the search paths"). `get_native_multiarch_triplet` and `gdb_command` do not use this method any more. Therefore `get_native_multiarch_triplet` can be dropped.
a9bb09f to
2c69dc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_retrace_jammy_sandboxfails on non-amd64 (e.g. on arm64):Avoid calling binaries from other architectures to determine the library search path. So add a hard-coded mapping from the Debian architecture to the multi-arch triplet instead.
Extent
get_library_pathsto take an optionalarchitectureparameter which returns the default value from ld.so.The dpkg-dev dependency can be dropped for the integration tests, because
dpkg-architectureis not called any more.Bug: https://launchpad.net/bugs/2150427