public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] image: limit search for *.core to regular files
@ 2024-03-12  7:39 Cedric Hombourger
  2024-03-12  8:11 ` Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Cedric Hombourger @ 2024-03-12  7:39 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Code to search and delete core dumps in the build tree assumes that
the build host has a kernel.core_pattern setting which would result
in core dumps having a .core file suffix: this is not guaranteed. One
may also argue that the build should have failed if a process executed
under qemu-user got to crash (and we should check why qemu has crashed
and fix it). My vote would be to kill that code but for now, make it
less wrong by restricting the search to regular files suffixed with
.core (this would at least stop isar from moving directories such as
"org.eclipse.equinox.p2.core" out of the image).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 73f1d52c..793c21a2 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -457,7 +457,7 @@ EOSUDO
 
     # Sometimes qemu-user-static generates coredumps in chroot, move them
     # to work temporary directory and inform user about it.
-    for f in $(sudo find ${ROOTFSDIR} -name *.core); do
+    for f in $(sudo find ${ROOTFSDIR} -type f -name *.core); do
         sudo mv "${f}" "${WORKDIR}/temp/"
         bbwarn "found core dump in rootfs, check it in ${WORKDIR}/temp/${f##*/}"
     done
-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-26 20:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12  7:39 [PATCH] image: limit search for *.core to regular files Cedric Hombourger
2024-03-12  8:11 ` Jan Kiszka
2024-03-12  8:31   ` MOESSBAUER, Felix
2024-03-12  9:03     ` Jan Kiszka
2024-03-12  9:10       ` cedric.hombourger
2024-03-22 13:11 ` Uladzimir Bely
2024-03-26 20:01 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox