public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Cedric Hombourger <cedric.hombourger@siemens.com>
To: isar-users@googlegroups.com
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>
Subject: [PATCH] image: limit search for *.core to regular files
Date: Tue, 12 Mar 2024 08:39:35 +0100	[thread overview]
Message-ID: <20240312073935.331457-1-cedric.hombourger@siemens.com> (raw)

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


             reply	other threads:[~2024-03-12  7:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12  7:39 Cedric Hombourger [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240312073935.331457-1-cedric.hombourger@siemens.com \
    --to=cedric.hombourger@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox