[Fuego] [PATCH 1/2] pppd: use command with absolute path
Liu, Gang
liug.fnst at cn.fujitsu.com
Mon Oct 29 08:12:55 UTC 2018
Hi Tim
Sorry for late reply.
> -----Original Message-----
> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> Sent: Friday, October 12, 2018 7:49 AM
> To: Liu, Gang/刘 刚 <liug.fnst at cn.fujitsu.com>;
> fuego at lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 1/2] pppd: use command with absolute path
>
> > -----Original Message-----
> > From: Liu Gang
> >
> > Use absolute path to fix the problem of can not find the commands when
> > working on /engine/tests/Functional.pppd/fuego_test.sh.
> > command:pppd,chat,ifconfig
> >
> > Signed-off-by: Liu Gang <liug.fnst at cn.fujitsu.com>
> > ---
> > engine/tests/Functional.pppd/fuego_test.sh | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/engine/tests/Functional.pppd/fuego_test.sh
> > b/engine/tests/Functional.pppd/fuego_test.sh
> > index d080871..11c0ebc 100755
> > --- a/engine/tests/Functional.pppd/fuego_test.sh
> > +++ b/engine/tests/Functional.pppd/fuego_test.sh
> > @@ -9,10 +9,10 @@ function test_build {
> > pwd; ls
> > ./ppp_response \$(cat slave1) &
> > sleep 1
> > - pppd connect 'chat -v \"\" AT OK ATDT5551212 CONNECT' \$(cat slave2)
> > 38400 debug defaultroute nocrtscts idle 60 &
> > + /usr/sbin/pppd connect '/usr/sbin/chat -v \"\" AT OK ATDT5551212
> > CONNECT' \$(cat slave2) 38400 debug defaultroute nocrtscts idle 60 &
> > sleep 5
> > - ifconfig -a
> > - if ifconfig ppp0 ; then
> > + /sbin/ifconfig -a
> > + if /sbin/ifconfig ppp0 ; then
> > echo 'TEST-1 OK'
> > else
> > echo 'TEST-1 FAILED'
> > --
> > 2.7.4
>
> Why are these commands not being found? Is there a problem with the PATH
> on the target board? I'm OK with this patch, but it sounds like you might
> be covering up another issue (missing directories in the PATH for the test
> user), which will continue to cause problems.
>
> I'm going to apply this, but I'd like to know why it's needed.
> -- Tim
>
>
When I run this case with fuego, these commands not being found.
I find the PATH was changed from "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" to "PATH=/usr/bin:/bin".
I think when use non-interactive non-login mode to run scripts with fuego, sbin(/usr/sbin) is not added to the PATH in my board.
Regards
Liu, Gang
More information about the Fuego
mailing list