All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [question] tst_rhost_run.sh not installed
@ 2021-07-16  6:13 Boyang Xue
  2021-07-16  6:43 ` Joerg Vehlow
  0 siblings, 1 reply; 4+ messages in thread
From: Boyang Xue @ 2021-07-16  6:13 UTC (permalink / raw)
  To: ltp

Hi,

I'm trying to build, install and run LTP like this:
```
git clone https://github.com/linux-test-project/ltp.git repo_ltp
pushd repo_ltp/
make autotools
./configure
make
make install
# export RHOST, LHOST, etc. test vars
export LTPROOT=/opt/ltp; export PATH=$LTPROOT/bin:$LTPROOT/testcases/bin:$PATH
./runltp -d /test -f net.nfs
```

During the test run, it complains that
```
/opt/ltp/testcases/bin/tst_net.sh: line 979: bash:: command not found
```
line#979 is:
```
eval $(tst_rhost_run -c 'tst_net_iface_prefix -r '$IPV4_RHOST || echo "exit $?")
```

I can find tst_net_iface_prefix in the $PATH, so it should be
tst_rhost_run which leads to the error.
Searching for tst_rhost_run in /opt/ltp and $PATH shows not found, so
is it a bug or did I miss something that the file wasn't installed?

It happens on the latest LTP:
```
# git rev-parse --short HEAD
5d8f9dfd6
```

Thanks,
Boyang


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

* [LTP] [question] tst_rhost_run.sh not installed
  2021-07-16  6:13 [LTP] [question] tst_rhost_run.sh not installed Boyang Xue
@ 2021-07-16  6:43 ` Joerg Vehlow
  2021-07-16 10:10   ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Vehlow @ 2021-07-16  6:43 UTC (permalink / raw)
  To: ltp

Hi,

Sorry for the duplicate, I forgot to add the mailing list...

On 7/16/2021 8:13 AM, Boyang Xue wrote:
> Hi,
>
> I'm trying to build, install and run LTP like this:
> ```
> git clone https://github.com/linux-test-project/ltp.git repo_ltp
> pushd repo_ltp/
> make autotools
> ./configure
> make
> make install
> # export RHOST, LHOST, etc. test vars
> export LTPROOT=/opt/ltp; export PATH=$LTPROOT/bin:$LTPROOT/testcases/bin:$PATH
> ./runltp -d /test -f net.nfs
> ```
>
> During the test run, it complains that
> ```
> /opt/ltp/testcases/bin/tst_net.sh: line 979: bash:: command not found
> ```
> line#979 is:
> ```
> eval $(tst_rhost_run -c 'tst_net_iface_prefix -r '$IPV4_RHOST || echo "exit $?")
> ```
>
> I can find tst_net_iface_prefix in the $PATH, so it should be
> tst_rhost_run which leads to the error.
> Searching for tst_rhost_run in /opt/ltp and $PATH shows not found, so
> is it a bug or did I miss something that the file wasn't installed?
No tst_rhost_run is a shell function defined in tst_net.sh.
I guess the problem is your RHOST setup.
LTP supports two setups for network tests:
1. network namespace based. This is used if you don't set RHOST and LHOST.
2. Two-host setup, where RHOST points to a second host.

The important thing in two host setup is, that $LTP_ROOT/testcases/bin 
is in the PATH for the user, that is used on the RHOST.
I guess what happens in your setup is that tst_net_iface_prefix is not 
found on the RHOST, because it is not in the path.

Joerg

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

* [LTP] [question] tst_rhost_run.sh not installed
  2021-07-16  6:43 ` Joerg Vehlow
@ 2021-07-16 10:10   ` Petr Vorel
  2021-07-17 11:33     ` Boyang Xue
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2021-07-16 10:10 UTC (permalink / raw)
  To: ltp

> Hi,

> Sorry for the duplicate, I forgot to add the mailing list...

> On 7/16/2021 8:13 AM, Boyang Xue wrote:
> > Hi,

> > I'm trying to build, install and run LTP like this:
> > ```
> > git clone https://github.com/linux-test-project/ltp.git repo_ltp
> > pushd repo_ltp/
> > make autotools
> > ./configure
> > make
> > make install
> > # export RHOST, LHOST, etc. test vars
> > export LTPROOT=/opt/ltp; export PATH=$LTPROOT/bin:$LTPROOT/testcases/bin:$PATH
> > ./runltp -d /test -f net.nfs
> > ```

> > During the test run, it complains that
> > ```
> > /opt/ltp/testcases/bin/tst_net.sh: line 979: bash:: command not found
> > ```
> > line#979 is:
> > ```
> > eval $(tst_rhost_run -c 'tst_net_iface_prefix -r '$IPV4_RHOST || echo "exit $?")
> > ```

> > I can find tst_net_iface_prefix in the $PATH, so it should be
> > tst_rhost_run which leads to the error.
> > Searching for tst_rhost_run in /opt/ltp and $PATH shows not found, so
> > is it a bug or did I miss something that the file wasn't installed?
> No tst_rhost_run is a shell function defined in tst_net.sh.
> I guess the problem is your RHOST setup.
> LTP supports two setups for network tests:
> 1. network namespace based. This is used if you don't set RHOST and LHOST.
> 2. Two-host setup, where RHOST points to a second host.

> The important thing in two host setup is, that $LTP_ROOT/testcases/bin is in
> the PATH for the user, that is used on the RHOST.
> I guess what happens in your setup is that tst_net_iface_prefix is not found
> on the RHOST, because it is not in the path.

+1
FYI see
https://github.com/linux-test-project/ltp/tree/master/testcases/network

Kind regards,
Petr

> Joerg

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

* [LTP] [question] tst_rhost_run.sh not installed
  2021-07-16 10:10   ` Petr Vorel
@ 2021-07-17 11:33     ` Boyang Xue
  0 siblings, 0 replies; 4+ messages in thread
From: Boyang Xue @ 2021-07-17 11:33 UTC (permalink / raw)
  To: ltp

Thanks Petr and Joerg!

Yes. I was testing with the two-host setup. Previously RHOST didn't
have LTP installed, so there's no tst_net_iface_prefix. After
installing LTP on RHOST and setting LTPROOT & PATH env variables
there, the error disappeared and it works well now.

Thanks,
Boyang

On Fri, Jul 16, 2021 at 6:20 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> > Hi,
>
> > Sorry for the duplicate, I forgot to add the mailing list...
>
> > On 7/16/2021 8:13 AM, Boyang Xue wrote:
> > > Hi,
>
> > > I'm trying to build, install and run LTP like this:
> > > ```
> > > git clone https://github.com/linux-test-project/ltp.git repo_ltp
> > > pushd repo_ltp/
> > > make autotools
> > > ./configure
> > > make
> > > make install
> > > # export RHOST, LHOST, etc. test vars
> > > export LTPROOT=/opt/ltp; export PATH=$LTPROOT/bin:$LTPROOT/testcases/bin:$PATH
> > > ./runltp -d /test -f net.nfs
> > > ```
>
> > > During the test run, it complains that
> > > ```
> > > /opt/ltp/testcases/bin/tst_net.sh: line 979: bash:: command not found
> > > ```
> > > line#979 is:
> > > ```
> > > eval $(tst_rhost_run -c 'tst_net_iface_prefix -r '$IPV4_RHOST || echo "exit $?")
> > > ```
>
> > > I can find tst_net_iface_prefix in the $PATH, so it should be
> > > tst_rhost_run which leads to the error.
> > > Searching for tst_rhost_run in /opt/ltp and $PATH shows not found, so
> > > is it a bug or did I miss something that the file wasn't installed?
> > No tst_rhost_run is a shell function defined in tst_net.sh.
> > I guess the problem is your RHOST setup.
> > LTP supports two setups for network tests:
> > 1. network namespace based. This is used if you don't set RHOST and LHOST.
> > 2. Two-host setup, where RHOST points to a second host.
>
> > The important thing in two host setup is, that $LTP_ROOT/testcases/bin is in
> > the PATH for the user, that is used on the RHOST.
> > I guess what happens in your setup is that tst_net_iface_prefix is not found
> > on the RHOST, because it is not in the path.
>
> +1
> FYI see
> https://github.com/linux-test-project/ltp/tree/master/testcases/network
>
> Kind regards,
> Petr
>
> > Joerg
>


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

end of thread, other threads:[~2021-07-17 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  6:13 [LTP] [question] tst_rhost_run.sh not installed Boyang Xue
2021-07-16  6:43 ` Joerg Vehlow
2021-07-16 10:10   ` Petr Vorel
2021-07-17 11:33     ` Boyang Xue

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.