All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Tim.Bird@sony.com>
To: liug.fnst@cn.fujitsu.com, fuego@lists.linuxfoundation.org
Subject: Re: [Fuego] [PATCH 1/2] pppd: use command with absolute path
Date: Mon, 29 Oct 2018 22:41:39 +0000	[thread overview]
Message-ID: <ECADFF3FD767C149AD96A924E7EA6EAF88A2DCE1@USCULXMSG01.am.sony.com> (raw)
In-Reply-To: <FEAC83767BAC4846B0BE56AD4A95A0F1F72E0B@G08CNEXMBPEKD03.g08.fujitsu.local>



> -----Original Message-----
> From: Liu, Gang
> 
> Hi Tim
> 
> Sorry for late reply.
> 
> > -----Original Message-----
>> From: Tim Bird
> > Sent: Friday, October 12, 2018 7:49 AM
> > > -----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@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.

OK - this sounds like a board-specific, or distribution-specific problem.
Maybe you need to adjust the .profile for non-interactive sessions on
the board under test, to use the standard PATH.

I will leave the patch as is, because the full path matches that used by the
Filesystem Hierarchy Standard, version 3.0.  See https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf
section 3.16 on system binaries.
So, a Linux system should always have 'ifconfig' in the /sbin directory.
The FHS doesn't mention pppd, but I'm guessing that it's standard location
is /usr/sbin.  If we get a bug report about /usr/sbin/pppd not found, however, I may
back this patch out, and request that you fix your board to include /usr/sbin in
the non-interactive shell PATH.

Thanks for following up with the information.
 -- Tim



      reply	other threads:[~2018-10-29 22:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11  3:48 [Fuego] [PATCH 1/2] pppd: use command with absolute path Liu Gang
2018-10-11  3:48 ` [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found Liu Gang
2018-10-11 23:46   ` Tim.Bird
2018-10-29  8:16     ` Liu, Gang
2018-10-29 22:27       ` Tim.Bird
2018-10-11 23:49 ` [Fuego] [PATCH 1/2] pppd: use command with absolute path Tim.Bird
2018-10-29  8:12   ` Liu, Gang
2018-10-29 22:41     ` Tim.Bird [this message]

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=ECADFF3FD767C149AD96A924E7EA6EAF88A2DCE1@USCULXMSG01.am.sony.com \
    --to=tim.bird@sony.com \
    --cc=fuego@lists.linuxfoundation.org \
    --cc=liug.fnst@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.