diff options
author | Omar Sandoval <[email protected]> | 2024-07-23 15:35:37 -0700 |
---|---|---|
committer | Aaron Merey <[email protected]> | 2024-07-24 18:13:40 -0400 |
commit | 64186d7548db976caffa9d2ba210eed66cdc808f (patch) | |
tree | dbba025ded2af2788bd4982cc7a4b1bc8a8c17d6 /tests | |
parent | a49d5c0e6dee7026c54699f6024ecd0a22a9aa5b (diff) |
debuginfod: fix skipping <built-in> source file
dwarf_extract_source_paths explicitly skips source files that equal
"<built-in>", but dwarf_filesrc may return a path like "dir/<built-in>".
Check for and skip that case, too.
In particular, the test debuginfod RPMs have paths like this. However,
the test cases didn't catch this because they have a bug, too: they
follow symlinks, which results in double-counting every file. Fix that,
too.
Signed-off-by: Omar Sandoval <[email protected]>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run-debuginfod-archive-groom.sh | 2 | ||||
-rwxr-xr-x | tests/run-debuginfod-extraction.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/run-debuginfod-archive-groom.sh b/tests/run-debuginfod-archive-groom.sh index e2c394ef..0131158f 100755 --- a/tests/run-debuginfod-archive-groom.sh +++ b/tests/run-debuginfod-archive-groom.sh @@ -109,7 +109,7 @@ for i in $newrpms; do rpm2cpio ../$i | cpio -ivd; cd ..; done -sourcefiles=$(find -name \*\\.debug \ +sourcefiles=$(find -name \*\\.debug -type f \ | env LD_LIBRARY_PATH=$ldpath xargs \ ${abs_top_builddir}/src/readelf --debug-dump=decodedline \ | grep mtime: | wc --lines) diff --git a/tests/run-debuginfod-extraction.sh b/tests/run-debuginfod-extraction.sh index da6b25cf..f49dc6f6 100755 --- a/tests/run-debuginfod-extraction.sh +++ b/tests/run-debuginfod-extraction.sh @@ -94,7 +94,7 @@ for i in $newrpms; do rpm2cpio ../$i | cpio -ivd; cd ..; done -sourcefiles=$(find -name \*\\.debug \ +sourcefiles=$(find -name \*\\.debug -type f \ | env LD_LIBRARY_PATH=$ldpath xargs \ ${abs_top_builddir}/src/readelf --debug-dump=decodedline \ | grep mtime: | wc --lines) |