meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm/lib: pass the PATH to fvp runner
@ 2023-03-29 12:00 Clément Péron
  2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Clément Péron @ 2023-03-29 12:00 UTC (permalink / raw)
  To: meta-arm; +Cc: Clément Péron

When running an FVP machine the model executable need to be found
in the PATH environement.

At the moment the script doesn't provide any PATH to the subprocess.

Add PATH to the allowed environement variable to be forwaded.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 meta-arm/lib/fvp/runner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
index 28351a39..40ad1f3c 100644
--- a/meta-arm/lib/fvp/runner.py
+++ b/meta-arm/lib/fvp/runner.py
@@ -63,7 +63,7 @@ class FVPRunner:
         # Pass through environment variables needed for GUI applications, such
         # as xterm, to work.
         env = config['env']
-        for name in ('DISPLAY', 'WAYLAND_DISPLAY'):
+        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
             if name in os.environ:
                 env[name] = os.environ[name]
 
-- 
2.34.1



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

* [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
  2023-03-29 12:00 [PATCH 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
@ 2023-03-29 12:00 ` Clément Péron
  2023-03-29 15:42   ` [meta-arm] " Peter Hoyes
  2023-03-31  3:01 ` [PATCH 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
  2023-05-25  0:51 ` Jon Mason
  2 siblings, 1 reply; 6+ messages in thread
From: Clément Péron @ 2023-03-29 12:00 UTC (permalink / raw)
  To: meta-arm; +Cc: Clément Péron

We access the dictionnary element that doesn't exist.

Use the get() method instead that will default the element to None if it
doesn't exist.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 scripts/runfvp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/runfvp b/scripts/runfvp
index c5a74b2f..ee60486c 100755
--- a/scripts/runfvp
+++ b/scripts/runfvp
@@ -55,8 +55,8 @@ async def start_fvp(args, config, extra_args):
 
         if args.console:
             fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
-            expected_terminal = config["consoles"]["default"]
-            if not expected_terminal:
+            expected_terminal = config["consoles"].get("default")
+            if expected_terminal is None:
                 logger.error("--console used but FVP_CONSOLE not set in machine configuration")
                 return 1
             telnet = await fvp.create_telnet(expected_terminal)
-- 
2.34.1



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

* Re: [meta-arm] [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
  2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
@ 2023-03-29 15:42   ` Peter Hoyes
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Hoyes @ 2023-03-29 15:42 UTC (permalink / raw)
  To: peron.clem, meta-arm

On 29/03/2023 13:00, Clément Péron via lists.yoctoproject.org wrote:
> We access the dictionnary element that doesn't exist.
>
> Use the get() method instead that will default the element to None if it
> doesn't exist.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Peter Hoyes <peter.hoyes@arm.com>
> ---
>   scripts/runfvp | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/runfvp b/scripts/runfvp
> index c5a74b2f..ee60486c 100755
> --- a/scripts/runfvp
> +++ b/scripts/runfvp
> @@ -55,8 +55,8 @@ async def start_fvp(args, config, extra_args):
>   
>           if args.console:
>               fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
> -            expected_terminal = config["consoles"]["default"]
> -            if not expected_terminal:
> +            expected_terminal = config["consoles"].get("default")
> +            if expected_terminal is None:
>                   logger.error("--console used but FVP_CONSOLE not set in machine configuration")
>                   return 1
>               telnet = await fvp.create_telnet(expected_terminal)
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#4496): https://lists.yoctoproject.org/g/meta-arm/message/4496
> Mute This Topic: https://lists.yoctoproject.org/mt/97926510/5715260
> Group Owner: meta-arm+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [peter.hoyes@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [PATCH 1/2] arm/lib: pass the PATH to fvp runner
  2023-03-29 12:00 [PATCH 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
  2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
@ 2023-03-31  3:01 ` Jon Mason
  2023-03-31 20:11   ` Jon Mason
  2023-05-25  0:51 ` Jon Mason
  2 siblings, 1 reply; 6+ messages in thread
From: Jon Mason @ 2023-03-31  3:01 UTC (permalink / raw)
  To: Clément Péron; +Cc: meta-arm

On Wed, Mar 29, 2023 at 02:00:56PM +0200, Cl�ment P�ron wrote:
> When running an FVP machine the model executable need to be found
> in the PATH environement.
> 
> At the moment the script doesn't provide any PATH to the subprocess.
> 
> Add PATH to the allowed environement variable to be forwaded.
> 
> Signed-off-by: Cl�ment P�ron <peron.clem@gmail.com>

This patch doesn't apply cleanly to the master branch.  I think it's
as simple as appending to the list of variables passed to the
environment, but I'll leave it to you to confirm and test.

Thanks,
Jon

> ---
>  meta-arm/lib/fvp/runner.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
> index 28351a39..40ad1f3c 100644
> --- a/meta-arm/lib/fvp/runner.py
> +++ b/meta-arm/lib/fvp/runner.py
> @@ -63,7 +63,7 @@ class FVPRunner:
>          # Pass through environment variables needed for GUI applications, such
>          # as xterm, to work.
>          env = config['env']
> -        for name in ('DISPLAY', 'WAYLAND_DISPLAY'):
> +        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
>              if name in os.environ:
>                  env[name] = os.environ[name]
>  
> -- 
> 2.34.1
> 
> 


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

* Re: [PATCH 1/2] arm/lib: pass the PATH to fvp runner
  2023-03-31  3:01 ` [PATCH 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
@ 2023-03-31 20:11   ` Jon Mason
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2023-03-31 20:11 UTC (permalink / raw)
  To: Clément Péron; +Cc: meta-arm

On Thu, Mar 30, 2023 at 11:01:07PM -0400, Jon Mason wrote:
> On Wed, Mar 29, 2023 at 02:00:56PM +0200, Cl�ment P�ron wrote:
> > When running an FVP machine the model executable need to be found
> > in the PATH environement.
> > 
> > At the moment the script doesn't provide any PATH to the subprocess.
> > 
> > Add PATH to the allowed environement variable to be forwaded.
> > 
> > Signed-off-by: Cl�ment P�ron <peron.clem@gmail.com>
> 
> This patch doesn't apply cleanly to the master branch.  I think it's
> as simple as appending to the list of variables passed to the
> environment, but I'll leave it to you to confirm and test.

I attempted to update but it fails selftest
Anyway, it might be a starting point for you
https://gitlab.com/jonmason00/meta-arm/-/commits/master-next2

> 
> Thanks,
> Jon
> 
> > ---
> >  meta-arm/lib/fvp/runner.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta-arm/lib/fvp/runner.py b/meta-arm/lib/fvp/runner.py
> > index 28351a39..40ad1f3c 100644
> > --- a/meta-arm/lib/fvp/runner.py
> > +++ b/meta-arm/lib/fvp/runner.py
> > @@ -63,7 +63,7 @@ class FVPRunner:
> >          # Pass through environment variables needed for GUI applications, such
> >          # as xterm, to work.
> >          env = config['env']
> > -        for name in ('DISPLAY', 'WAYLAND_DISPLAY'):
> > +        for name in ('DISPLAY', 'PATH', 'WAYLAND_DISPLAY'):
> >              if name in os.environ:
> >                  env[name] = os.environ[name]
> >  
> > -- 
> > 2.34.1
> > 
> > 
> 


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

* Re: [PATCH 1/2] arm/lib: pass the PATH to fvp runner
  2023-03-29 12:00 [PATCH 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
  2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
  2023-03-31  3:01 ` [PATCH 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
@ 2023-05-25  0:51 ` Jon Mason
  2 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2023-05-25  0:51 UTC (permalink / raw)
  To: meta-arm, Clément Péron

On Wed, 29 Mar 2023 14:00:56 +0200, Clément Péron wrote:
> When running an FVP machine the model executable need to be found
> in the PATH environement.
> 
> At the moment the script doesn't provide any PATH to the subprocess.
> 
> Add PATH to the allowed environement variable to be forwaded.

Applied, thanks!

[1/2] arm/lib: pass the PATH to fvp runner
      commit: fa598021fb387e98bdb80861f245cc15acde4ca5
[2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
      commit: 316e02c0f13b473e916cd779e59f0d55d48e4962

Best regards,
-- 
Jon Mason <jon.mason@arm.com>


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

end of thread, other threads:[~2023-05-25  0:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 12:00 [PATCH 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
2023-03-29 15:42   ` [meta-arm] " Peter Hoyes
2023-03-31  3:01 ` [PATCH 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
2023-03-31 20:11   ` Jon Mason
2023-05-25  0:51 ` Jon Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).