All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH 1/2] pppd: use command with absolute path
@ 2018-10-11  3:48 Liu Gang
  2018-10-11  3:48 ` [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found Liu Gang
  2018-10-11 23:49 ` [Fuego] [PATCH 1/2] pppd: use command with absolute path Tim.Bird
  0 siblings, 2 replies; 8+ messages in thread
From: Liu Gang @ 2018-10-11  3:48 UTC (permalink / raw)
  To: fuego

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




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

* [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found
  2018-10-11  3:48 [Fuego] [PATCH 1/2] pppd: use command with absolute path Liu Gang
@ 2018-10-11  3:48 ` Liu Gang
  2018-10-11 23:46   ` Tim.Bird
  2018-10-11 23:49 ` [Fuego] [PATCH 1/2] pppd: use command with absolute path Tim.Bird
  1 sibling, 1 reply; 8+ messages in thread
From: Liu Gang @ 2018-10-11  3:48 UTC (permalink / raw)
  To: fuego

When the device /dev/ppp or /dev/ppp0 is not exist, create it.

Signed-off-by: Liu Gang <liug.fnst@cn.fujitsu.com>
---
 engine/tests/Functional.pppd/fuego_test.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/engine/tests/Functional.pppd/fuego_test.sh b/engine/tests/Functional.pppd/fuego_test.sh
index 11c0ebc..3130dbe 100755
--- a/engine/tests/Functional.pppd/fuego_test.sh
+++ b/engine/tests/Functional.pppd/fuego_test.sh
@@ -31,6 +31,8 @@ function test_deploy {
 }
 
 function test_run {
+    cmd "if ls /dev/ppp;then echo '/dev/ppp exist';else mknod /dev/ppp c 108 0;fi"
+    cmd "if ls /dev/ppp0;then echo '/dev/ppp0 exist';else mknod /dev/ppp0 c 108 0;fi"
     report "cd $BOARD_TESTDIR/fuego.$TESTDIR; sh -v run-tests.sh 2>&1"
 }
 
-- 
2.7.4




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

* Re: [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Tim.Bird @ 2018-10-11 23:46 UTC (permalink / raw)
  To: liug.fnst, fuego



> -----Original Message-----
> From: Liu Gang
> 
> When the device /dev/ppp or /dev/ppp0 is not exist, create it.
> 
> Signed-off-by: Liu Gang <liug.fnst@cn.fujitsu.com>
> ---
>  engine/tests/Functional.pppd/fuego_test.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/engine/tests/Functional.pppd/fuego_test.sh
> b/engine/tests/Functional.pppd/fuego_test.sh
> index 11c0ebc..3130dbe 100755
> --- a/engine/tests/Functional.pppd/fuego_test.sh
> +++ b/engine/tests/Functional.pppd/fuego_test.sh
> @@ -31,6 +31,8 @@ function test_deploy {
>  }
> 
>  function test_run {
> +    cmd "if ls /dev/ppp;then echo '/dev/ppp exist';else mknod /dev/ppp c
> 108 0;fi"
> +    cmd "if ls /dev/ppp0;then echo '/dev/ppp0 exist';else mknod /dev/ppp0 c
> 108 0;fi"
>      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; sh -v run-tests.sh 2>&1"
>  }
> 
> --
> 2.7.4

What distribution is this, that is missing 'ppp' and 'ppp0' device nodes?

At the end of the test, the machine should be in the same state it was in when
you started the test.  If /dev/ppp did not exist when the test started, it should be
removed when the test is done.  The same is true of /dev/ppp0.

Please add some more code to remove any created device nodes, and resubmit.

Thanks,
 -- Tim


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

* Re: [Fuego] [PATCH 1/2] pppd: use command with absolute path
  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:49 ` Tim.Bird
  2018-10-29  8:12   ` Liu, Gang
  1 sibling, 1 reply; 8+ messages in thread
From: Tim.Bird @ 2018-10-11 23:49 UTC (permalink / raw)
  To: liug.fnst, fuego

> -----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


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

* Re: [Fuego] [PATCH 1/2] pppd: use command with absolute path
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Liu, Gang @ 2018-10-29  8:12 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim

Sorry for late reply.

> -----Original Message-----
> From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> Sent: Friday, October 12, 2018 7:49 AM
> To: Liu, Gang/刘 刚 <liug.fnst@cn.fujitsu.com>;
> fuego@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@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



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

* Re: [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found
  2018-10-11 23:46   ` Tim.Bird
@ 2018-10-29  8:16     ` Liu, Gang
  2018-10-29 22:27       ` Tim.Bird
  0 siblings, 1 reply; 8+ messages in thread
From: Liu, Gang @ 2018-10-29  8:16 UTC (permalink / raw)
  To: Tim.Bird, fuego

Hi Tim

Sorry for late reply.

> -----Original Message-----
> From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> Sent: Friday, October 12, 2018 7:46 AM
> To: Liu, Gang/刘 刚 <liug.fnst@cn.fujitsu.com>;
> fuego@lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found
> 
> 
> 
> > -----Original Message-----
> > From: Liu Gang
> >
> > When the device /dev/ppp or /dev/ppp0 is not exist, create it.
> >
> > Signed-off-by: Liu Gang <liug.fnst@cn.fujitsu.com>
> > ---
> >  engine/tests/Functional.pppd/fuego_test.sh | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/engine/tests/Functional.pppd/fuego_test.sh
> > b/engine/tests/Functional.pppd/fuego_test.sh
> > index 11c0ebc..3130dbe 100755
> > --- a/engine/tests/Functional.pppd/fuego_test.sh
> > +++ b/engine/tests/Functional.pppd/fuego_test.sh
> > @@ -31,6 +31,8 @@ function test_deploy {  }
> >
> >  function test_run {
> > +    cmd "if ls /dev/ppp;then echo '/dev/ppp exist';else mknod
> > + /dev/ppp c
> > 108 0;fi"
> > +    cmd "if ls /dev/ppp0;then echo '/dev/ppp0 exist';else mknod
> > + /dev/ppp0 c
> > 108 0;fi"
> >      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; sh -v run-tests.sh 2>&1"
> >  }
> >
> > --
> > 2.7.4
> 
> What distribution is this, that is missing 'ppp' and 'ppp0' device nodes?
> 
> At the end of the test, the machine should be in the same state it was in
> when you started the test.  If /dev/ppp did not exist when the test started,
> it should be removed when the test is done.  The same is true of /dev/ppp0.
> 
> Please add some more code to remove any created device nodes, and resubmit.
> 
> Thanks,
>  -- Tim
> 
> 

It is my mistake about this problem.
According to my research, this patch is needless, please ignore it.

The research process is as below:
When I was running this test case first time, the jenkins output something like below:

Couldn't open the /dev/ppp device: No such file or directory
/usr/sbin/pppd: You need to create the /dev/ppp device node by
executing the following command as root:
	mknod /dev/ppp c 108 0
	
After made node /dev/ppp, the jenkins output something like below:

Couldn't open the /dev/ppp device: No such device or address
/usr/sbin/pppd: Please load the ppp_generic kernel module.

So the question was that I did not enable PPP config in the kernel config file.
After the PPP config was enabled in the kernel config file, all was fine.
So this patch is needless.
Sorry for the mistake.

Regards

Liu, Gang



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

* Re: [Fuego] [PATCH 2/2] pppd: fix ppp/ppp0 device not found
  2018-10-29  8:16     ` Liu, Gang
@ 2018-10-29 22:27       ` Tim.Bird
  0 siblings, 0 replies; 8+ messages in thread
From: Tim.Bird @ 2018-10-29 22:27 UTC (permalink / raw)
  To: liug.fnst, fuego



> -----Original Message-----
> From: Liu, Gang 
> Hi Tim
> 
> Sorry for late reply.
> 
> > -----Original Message-----
> > From: Tim.Bird@sony.com [mailto:Tim.Bird@sony.com]
> > Sent: Friday, October 12, 2018 7:46 AM
> > > -----Original Message-----
> > > From: Liu Gang
> > >
> > > When the device /dev/ppp or /dev/ppp0 is not exist, create it.
> > >
> > > Signed-off-by: Liu Gang <liug.fnst@cn.fujitsu.com>
> > > ---
> > >  engine/tests/Functional.pppd/fuego_test.sh | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/engine/tests/Functional.pppd/fuego_test.sh
> > > b/engine/tests/Functional.pppd/fuego_test.sh
> > > index 11c0ebc..3130dbe 100755
> > > --- a/engine/tests/Functional.pppd/fuego_test.sh
> > > +++ b/engine/tests/Functional.pppd/fuego_test.sh
> > > @@ -31,6 +31,8 @@ function test_deploy {  }
> > >
> > >  function test_run {
> > > +    cmd "if ls /dev/ppp;then echo '/dev/ppp exist';else mknod
> > > + /dev/ppp c
> > > 108 0;fi"
> > > +    cmd "if ls /dev/ppp0;then echo '/dev/ppp0 exist';else mknod
> > > + /dev/ppp0 c
> > > 108 0;fi"
> > >      report "cd $BOARD_TESTDIR/fuego.$TESTDIR; sh -v run-tests.sh 2>&1"
> > >  }
> > >
> > > --
> > > 2.7.4
> >
> > What distribution is this, that is missing 'ppp' and 'ppp0' device nodes?
> >
> > At the end of the test, the machine should be in the same state it was in
> > when you started the test.  If /dev/ppp did not exist when the test started,
> > it should be removed when the test is done.  The same is true of
> /dev/ppp0.
> >
> > Please add some more code to remove any created device nodes, and
> resubmit.
> >
> > Thanks,
> >  -- Tim
> >
> >
> 
> It is my mistake about this problem.
> According to my research, this patch is needless, please ignore it.
> 
> The research process is as below:
> When I was running this test case first time, the jenkins output something
> like below:
> 
> Couldn't open the /dev/ppp device: No such file or directory
> /usr/sbin/pppd: You need to create the /dev/ppp device node by
> executing the following command as root:
> 	mknod /dev/ppp c 108 0
> 
> After made node /dev/ppp, the jenkins output something like below:
> 
> Couldn't open the /dev/ppp device: No such device or address
> /usr/sbin/pppd: Please load the ppp_generic kernel module.
> 
> So the question was that I did not enable PPP config in the kernel config file.
> After the PPP config was enabled in the kernel config file, all was fine.
> So this patch is needless.
> Sorry for the mistake.

OK - thanks for the explanation.
 -- Tim


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

* Re: [Fuego] [PATCH 1/2] pppd: use command with absolute path
  2018-10-29  8:12   ` Liu, Gang
@ 2018-10-29 22:41     ` Tim.Bird
  0 siblings, 0 replies; 8+ messages in thread
From: Tim.Bird @ 2018-10-29 22:41 UTC (permalink / raw)
  To: liug.fnst, fuego



> -----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



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

end of thread, other threads:[~2018-10-29 22:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.