<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
On 07/21/2017 07:04 AM, Petr Vorel wrote:<br>
<blockquote cite="mid:20170721040407.868-6-pvorel@suse.cz"
type="cite">
<pre wrap="">Signed-off-by: Petr Vorel <a class="moz-txt-link-rfc2396E" href="mailto:pvorel@suse.cz"><pvorel@suse.cz></a>
---
testcases/lib/test_net.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh
index 76e6b0a41..0cafe1514 100644
--- a/testcases/lib/test_net.sh
+++ b/testcases/lib/test_net.sh
@@ -55,7 +55,6 @@ init_ltp_netspace()
# -b run in background
# -s safe option, if something goes wrong, will exit with TBROK
# -c specify command to run
-
tst_rhost_run()
{
local pre_cmd=
@@ -91,15 +90,16 @@ tst_rhost_run()
local output=
local ret=0
+ local newpath="$LTPROOT/testcases/bin"</pre>
</blockquote>
<br>
Why setting the PATH, LTPROOT can't be done before test run on
remote host? what if LTPROOT differs b/w machines?<br>
<br>
<blockquote cite="mid:20170721040407.868-6-pvorel@suse.cz"
type="cite">
<pre wrap=""> if [ -n "${TST_USE_SSH:-}" ]; then
- output=`ssh -n -q $user@$RHOST "sh -c \
- '$pre_cmd $cmd $post_cmd'" $out 2>&1 || echo 'RTERR'`
+ output=`ssh -n -q $user@$RHOST "PATH=$newpath:\$PATH \
+ sh -c '$pre_cmd $cmd $post_cmd'" $out 2>&1 || echo 'RTERR'`</pre>
</blockquote>
<br>
$PATH still expands on local machine with backticks<br>
<br>
echo `echo "\$PATH"` vs echo `echo "\\$PATH"`<br>
<br>
or better use POSIX $(...)<br>
<br>
echo $(echo "\$PATH")<br>
<br>
Thanks,<br>
Alexey<br>
<br>
</body>
</html>