]> git.lttng.org Git - lttng-ci.git/commitdiff
jjb: Collect binaries from lttng-tools coredumps
authorKienan Stewart <kstewart@efficios.com>
Tue, 17 Dec 2024 20:25:02 +0000 (15:25 -0500)
committerKienan Stewart <kstewart@efficios.com>
Thu, 19 Dec 2024 14:28:01 +0000 (09:28 -0500)
Change-Id: Icec573a14f1153099fcae688f7dc6d878eebb300
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
scripts/lttng-tools/postbuild_clean_processes_coredumps.sh

index bc62b1ae9ab1bf66fd8f3e626494f886bb8233ef..17e574875b27d906488e198000601ef09602f87a 100755 (executable)
@@ -72,12 +72,16 @@ while read -r core_file; do
 
     # Collect everything in the core file that looks like a reference to a
     # shared lib
-    strings "$core_file" | grep '^/.*\.so.*' | while read -r str; do
-        collect_recursive "$str"
+    strings "$core_file" | while read -r str; do
+        if [[ "${str}" =~ ^/.*\.so.* ]]; then
+            collect_recursive "${str}"
+        fi
+        if [[ -f "${str}" ]] && [[ -x "${str}" ]]; then
+            collect_recursive "${str}"
+        fi
     done
 
     echo "$core_file" >> "$file_list"
-
     # Exit with failure when core files are found
     ret=1
 done < <(find "/tmp" -maxdepth 1 -name "core\.[0-9]*" -type f 2>/dev/null)
This page took 0.026039 seconds and 4 git commands to generate.