Openembedded Core Discussions
 help / color / mirror / Atom feed
* [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log
@ 2026-08-25 12:56 P. Tatrai
  2026-09-05 22:29 ` [OE-core] " Yoann Congal
  2026-09-07 18:51 ` [scarthgap][PATCH v2] " P. Tatrai
  0 siblings, 2 replies; 7+ messages in thread
From: P. Tatrai @ 2026-08-25 12:56 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Tatrai

From: Peter Tatrai <peter.tatrai.ext@siemens.com>

When qemu test runs only produce suffixed bootlog variants, the base
bootlog path may not exist. Guard the symlink creation and log a note.

(From OE-Core rev: 7a6596925cb0eb8dd48a0362a51875cdd60152bc)

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
---
 meta/classes-recipe/testimage.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 33b1c13f9d..744de5d7de 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -395,7 +395,10 @@ def testimage_main(d):
     # Copy additional logs to tmp/log/oeqa so it's easier to find them
     targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
     os.makedirs(targetdir, exist_ok=True)
-    os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
+    if os.path.exists(bootlog):
+        os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
+    else:
+        bb.note("testimage: boot log not found at %s" % bootlog)
     os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
 
     if not results or not complete:
-- 
2.39.5



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

* Re: [OE-core] [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log
  2026-08-25 12:56 [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log P. Tatrai
@ 2026-09-05 22:29 ` Yoann Congal
  2026-09-07 18:57   ` Tatrai, Peter
  2026-09-07 18:51 ` [scarthgap][PATCH v2] " P. Tatrai
  1 sibling, 1 reply; 7+ messages in thread
From: Yoann Congal @ 2026-09-05 22:29 UTC (permalink / raw)
  To: peter.tatrai.ext, openembedded-core

On Tue Aug 25, 2026 at 2:56 PM CEST, Peter via lists.openembedded.org Tatrai wrote:
> From: Peter Tatrai <peter.tatrai.ext@siemens.com>
>
> When qemu test runs only produce suffixed bootlog variants, the base
> bootlog path may not exist. Guard the symlink creation and log a note.
>
> (From OE-Core rev: 7a6596925cb0eb8dd48a0362a51875cdd60152bc)
>
> Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
> ---
>  meta/classes-recipe/testimage.bbclass | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
> index 33b1c13f9d..744de5d7de 100644
> --- a/meta/classes-recipe/testimage.bbclass
> +++ b/meta/classes-recipe/testimage.bbclass
> @@ -395,7 +395,10 @@ def testimage_main(d):
>      # Copy additional logs to tmp/log/oeqa so it's easier to find them
>      targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
>      os.makedirs(targetdir, exist_ok=True)
> -    os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> +    if os.path.exists(bootlog):
> +        os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> +    else:
> +        bb.note("testimage: boot log not found at %s" % bootlog)
>      os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
>  
>      if not results or not complete:

Hello,

"(From OE-Core rev:" usually indicate a cherry pick but here this is not
a direct one.
Commit title/message changed and the master commit contained more diffs
that were not cherry-picked here.

Modified cherry-picks are fine but modifications should be minimal and
the non-trivial ones explained.

Can you send a v2 with the above suggestions?

Thanks!
-- 
Yoann Congal
Smile ECS



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

* [scarthgap][PATCH v2] testimage: avoid symlinking missing qemu boot log
  2026-08-25 12:56 [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log P. Tatrai
  2026-09-05 22:29 ` [OE-core] " Yoann Congal
@ 2026-09-07 18:51 ` P. Tatrai
  2026-09-11 12:32   ` [OE-core] " Yoann Congal
  1 sibling, 1 reply; 7+ messages in thread
From: P. Tatrai @ 2026-09-07 18:51 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Tatrai

From: Peter Tatrai <peter.tatrai.ext@siemens.com>

When qemu test runs only produce suffixed bootlog variants, the base
bootlog path may not exist. Guard the symlink creation and log a note
instead of raising FileNotFoundError.

This is a partial backport of master commit
7a6596925cb0eb8dd48a0362a51875cdd60152bc, which also introduces
bootlog variant globbing not applicable to scarthgap. Only the
symlink guard, which fixes a standalone bug, is picked here.

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
---
 meta/classes-recipe/testimage.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 33b1c13f9d..744de5d7de 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -395,7 +395,10 @@ def testimage_main(d):
     # Copy additional logs to tmp/log/oeqa so it's easier to find them
     targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
     os.makedirs(targetdir, exist_ok=True)
-    os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
+    if os.path.exists(bootlog):
+        os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
+    else:
+        bb.note("testimage: boot log not found at %s" % bootlog)
     os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
 
     if not results or not complete:
-- 
2.39.5



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

* RE: [OE-core] [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log
  2026-09-05 22:29 ` [OE-core] " Yoann Congal
@ 2026-09-07 18:57   ` Tatrai, Peter
  0 siblings, 0 replies; 7+ messages in thread
From: Tatrai, Peter @ 2026-09-07 18:57 UTC (permalink / raw)
  To: Yoann Congal, openembedded-core@lists.openembedded.org



> -----Original Message-----
> From: Yoann Congal <yoann.congal@smile.fr>
> Sent: Sunday, September 6, 2026 12:30 AM
> To: Tatrai, Peter (ext) (FT D EU SK BFS1) <peter.tatrai.ext@siemens.com>;
> openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [scarthgap][PATCH] testimage: avoid symlinking missing
> qemu boot log
> 
> [You don't often get email from yoann.congal@smile.fr. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> On Tue Aug 25, 2026 at 2:56 PM CEST, Peter via lists.openembedded.org Tatrai
> wrote:
> > From: Peter Tatrai <peter.tatrai.ext@siemens.com>
> >
> > When qemu test runs only produce suffixed bootlog variants, the base
> > bootlog path may not exist. Guard the symlink creation and log a note.
> >
> > (From OE-Core rev: 7a6596925cb0eb8dd48a0362a51875cdd60152bc)
> >
> > Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
> > ---
> >  meta/classes-recipe/testimage.bbclass | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/classes-recipe/testimage.bbclass
> > b/meta/classes-recipe/testimage.bbclass
> > index 33b1c13f9d..744de5d7de 100644
> > --- a/meta/classes-recipe/testimage.bbclass
> > +++ b/meta/classes-recipe/testimage.bbclass
> > @@ -395,7 +395,10 @@ def testimage_main(d):
> >      # Copy additional logs to tmp/log/oeqa so it's easier to find them
> >      targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
> >      os.makedirs(targetdir, exist_ok=True)
> > -    os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> > +    if os.path.exists(bootlog):
> > +        os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> > +    else:
> > +        bb.note("testimage: boot log not found at %s" % bootlog)
> >      os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir,
> > os.path.basename(d.getVar("BB_LOGFILE") + "." +
> > d.getVar('DATETIME'))))
> >
> >      if not results or not complete:
> 
> Hello,
> 
> "(From OE-Core rev:" usually indicate a cherry pick but here this is not a direct one.
> Commit title/message changed and the master commit contained more diffs that
> were not cherry-picked here.
> 
> Modified cherry-picks are fine but modifications should be minimal and the non-trivial
> ones explained.
> 
> Can you send a v2 with the above suggestions?
> 
> Thanks!
> --
> Yoann Congal
> Smile ECS

Hello Yoann,

Thanks for the review. I've sent a v2 addressing your comments: removed the misleading "(From OE-Core rev: ...)" line and added an explanation that this is a partial/minimal backport (only the symlink guard, not the bootlog-variants globbing from the master commit, which doesn't apply to scarthgap).

https://lists.openembedded.org/g/openembedded-core/topic/scarthgap_patch_v2/121133618

Regards,
Peter

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

* Re: [OE-core] [scarthgap][PATCH v2] testimage: avoid symlinking missing qemu boot log
  2026-09-07 18:51 ` [scarthgap][PATCH v2] " P. Tatrai
@ 2026-09-11 12:32   ` Yoann Congal
  2026-09-14  9:03     ` Tatrai, Peter
  0 siblings, 1 reply; 7+ messages in thread
From: Yoann Congal @ 2026-09-11 12:32 UTC (permalink / raw)
  To: peter.tatrai.ext, openembedded-core

On Mon Sep 7, 2026 at 8:51 PM CEST, Peter via lists.openembedded.org Tatrai wrote:
> From: Peter Tatrai <peter.tatrai.ext@siemens.com>
>
> When qemu test runs only produce suffixed bootlog variants, the base
> bootlog path may not exist. Guard the symlink creation and log a note
> instead of raising FileNotFoundError.

Hello,

Where does this FileNotFoundError happen in scarthgap?
os.symlink() has no problem creating a symlink to a non existing file
and I don't see where we would open bootlog (we do open bootlog in
wrynose/master though). Are you sure we need this fix on scarthgap? Or
maybe we need something else?

>
> This is a partial backport of master commit
> 7a6596925cb0eb8dd48a0362a51875cdd60152bc, which also introduces
> bootlog variant globbing not applicable to scarthgap. Only the
> symlink guard, which fixes a standalone bug, is picked here.
>
> Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
> ---
>  meta/classes-recipe/testimage.bbclass | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
> index 33b1c13f9d..744de5d7de 100644
> --- a/meta/classes-recipe/testimage.bbclass
> +++ b/meta/classes-recipe/testimage.bbclass
> @@ -395,7 +395,10 @@ def testimage_main(d):
>      # Copy additional logs to tmp/log/oeqa so it's easier to find them
>      targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
>      os.makedirs(targetdir, exist_ok=True)
> -    os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> +    if os.path.exists(bootlog):
> +        os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
> +    else:
> +        bb.note("testimage: boot log not found at %s" % bootlog)
>      os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
>  
>      if not results or not complete:

Regards,
-- 
Yoann Congal
Smile ECS



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

* RE: [OE-core] [scarthgap][PATCH v2] testimage: avoid symlinking missing qemu boot log
  2026-09-11 12:32   ` [OE-core] " Yoann Congal
@ 2026-09-14  9:03     ` Tatrai, Peter
  2026-09-14 14:02       ` Yoann Congal
  0 siblings, 1 reply; 7+ messages in thread
From: Tatrai, Peter @ 2026-09-14  9:03 UTC (permalink / raw)
  To: Yoann Congal, openembedded-core@lists.openembedded.org

Hello Yoann,

> Where does this FileNotFoundError happen in scarthgap?
> os.symlink() has no problem creating a symlink to a non existing file and I don't see
> where we would open bootlog (we do open bootlog in wrynose/master though). Are
> you sure we need this fix on scarthgap? Or maybe we need something else?

You are right, thanks for catching that.

In scarthgap this does not fail in os.symlink() itself: it creates a
dangling symlink when the base bootlog is missing. The FileNotFoundError
then happens later in our CI pipeline when collecting/copying the oeqa
log artifacts.

So, the issue is narrower than the v2 commit message says: the patch
avoids creating a misleading dangling bootlog symlink in the result log
directory. If that still sounds acceptable for scarthgap, I can send a
v3 with the commit message updated accordingly and without implying that
testimage itself raises FileNotFoundError.

Regards,
Peter



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

* Re: [OE-core] [scarthgap][PATCH v2] testimage: avoid symlinking missing qemu boot log
  2026-09-14  9:03     ` Tatrai, Peter
@ 2026-09-14 14:02       ` Yoann Congal
  0 siblings, 0 replies; 7+ messages in thread
From: Yoann Congal @ 2026-09-14 14:02 UTC (permalink / raw)
  To: Tatrai, Peter, openembedded-core@lists.openembedded.org

On Mon Sep 14, 2026 at 11:03 AM CEST, Peter Tatrai wrote:
> Hello Yoann,
>
>> Where does this FileNotFoundError happen in scarthgap?
>> os.symlink() has no problem creating a symlink to a non existing file and I don't see
>> where we would open bootlog (we do open bootlog in wrynose/master though). Are
>> you sure we need this fix on scarthgap? Or maybe we need something else?
>
> You are right, thanks for catching that.
>
> In scarthgap this does not fail in os.symlink() itself: it creates a
> dangling symlink when the base bootlog is missing. The FileNotFoundError
> then happens later in our CI pipeline when collecting/copying the oeqa
> log artifacts.
>
> So, the issue is narrower than the v2 commit message says: the patch
> avoids creating a misleading dangling bootlog symlink in the result log
> directory. If that still sounds acceptable for scarthgap, I can send a
> v3 with the commit message updated accordingly and without implying that
> testimage itself raises FileNotFoundError.

Yes, I would take that :)

Thanks!

>
> Regards,
> Peter


-- 
Yoann Congal
Smile ECS



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

end of thread, other threads:[~2026-09-14 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 12:56 [scarthgap][PATCH] testimage: avoid symlinking missing qemu boot log P. Tatrai
2026-09-05 22:29 ` [OE-core] " Yoann Congal
2026-09-07 18:57   ` Tatrai, Peter
2026-09-07 18:51 ` [scarthgap][PATCH v2] " P. Tatrai
2026-09-11 12:32   ` [OE-core] " Yoann Congal
2026-09-14  9:03     ` Tatrai, Peter
2026-09-14 14:02       ` Yoann Congal

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