Patchwork [RFC,1/1] testcase fail while using cross-test-ssh wrapper

login
register
mail settings
Submitter Han Mao
Date June 27, 2019, 7:33 a.m.
Message ID <6067f3ff4ac4b7e991405f216e928e62f4780c8b.1561620739.git.han_mao@c-sky.com>
Download mbox | patch
Permalink /patch/33446/
State New
Headers show

Comments

Han Mao - June 27, 2019, 7:33 a.m.
I did a regression test yesterday, and found tst-locale-locpath.sh and
tst-rtld-preload.sh failed due to some script problem. The ssh wrapper
is invoked twice on these testcase, seems some of the arguments are
not pass correctly for cross test.

tst-locale-locpath.sh test cmd:
/home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/scripts/cross-test-ssh.sh --timeoutfactor 6000 10.0.2.17 /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/scripts/cross-test-ssh.sh --timeoutfactor 6000 10.0.2.17 env LC_ALL=invalid-locale LOCPATH=does-not-exist /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/elf/ld.so --library-path /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/ /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/locale/locale

Cc: Florian Weimer <fweimer@redhat.com>
Cc: David Newall <glibc@davidnewall.com>
Cc: Vincent Chen<vincentc@andestech.com>
---
 elf/tst-rtld-preload.sh      | 2 +-
 locale/tst-locale-locpath.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
Florian Weimer - July 8, 2019, 12:09 p.m.
* Mao Han:

> I did a regression test yesterday, and found tst-locale-locpath.sh and
> tst-rtld-preload.sh failed due to some script problem. The ssh wrapper
> is invoked twice on these testcase, seems some of the arguments are
> not pass correctly for cross test.
>
> tst-locale-locpath.sh test cmd:
> /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/scripts/cross-test-ssh.sh --timeoutfactor 6000 10.0.2.17 /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/scripts/cross-test-ssh.sh --timeoutfactor 6000 10.0.2.17 env LC_ALL=invalid-locale LOCPATH=does-not-exist /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/elf/ld.so --library-path /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/ /home/vmh/workspace/buildroot2/buildroot/output/build/glibc-02d8b5ab1c89bcef2627d2b621bfb35b573852c2/build/locale/locale
>
> Cc: Florian Weimer <fweimer@redhat.com>
> Cc: David Newall <glibc@davidnewall.com>
> Cc: Vincent Chen<vincentc@andestech.com>
> ---
>  elf/tst-rtld-preload.sh      | 2 +-
>  locale/tst-locale-locpath.sh | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/elf/tst-rtld-preload.sh b/elf/tst-rtld-preload.sh
> index f0c0ca1..0fe9e4f 100755
> --- a/elf/tst-rtld-preload.sh
> +++ b/elf/tst-rtld-preload.sh
> @@ -31,7 +31,7 @@ echo "# [${test_wrapper}] [$rtld] [--library-path] [$library_path]" \
>       "[--preload] [$preload] [$test_program]"
>  ${test_wrapper_env} \
>  ${run_program_env} \
> -${test_wrapper} $rtld --library-path "$library_path" \
> +$rtld --library-path "$library_path" \
>    --preload "$preload" $test_program 2>&1 && rc=0 || rc=$?
>  echo "# exit status $rc"
>  
> diff --git a/locale/tst-locale-locpath.sh b/locale/tst-locale-locpath.sh
> index b83de90..1281e9c 100644
> --- a/locale/tst-locale-locpath.sh
> +++ b/locale/tst-locale-locpath.sh
> @@ -20,8 +20,8 @@
>  set -ex
>  
>  common_objpfx=$1
> -test_wrapper_env=$2
> -run_program_env=$3
> +test_wrapper_env=$3
> +run_program_env=
>  
>  LIBPATH="$common_objpfx"

Sorry, this patch doesn't look correct to me.  Why is it appropriate to
ignore evironment variables passed to the test script?

Thanks,
Florian

Patch

diff --git a/elf/tst-rtld-preload.sh b/elf/tst-rtld-preload.sh
index f0c0ca1..0fe9e4f 100755
--- a/elf/tst-rtld-preload.sh
+++ b/elf/tst-rtld-preload.sh
@@ -31,7 +31,7 @@  echo "# [${test_wrapper}] [$rtld] [--library-path] [$library_path]" \
      "[--preload] [$preload] [$test_program]"
 ${test_wrapper_env} \
 ${run_program_env} \
-${test_wrapper} $rtld --library-path "$library_path" \
+$rtld --library-path "$library_path" \
   --preload "$preload" $test_program 2>&1 && rc=0 || rc=$?
 echo "# exit status $rc"
 
diff --git a/locale/tst-locale-locpath.sh b/locale/tst-locale-locpath.sh
index b83de90..1281e9c 100644
--- a/locale/tst-locale-locpath.sh
+++ b/locale/tst-locale-locpath.sh
@@ -20,8 +20,8 @@ 
 set -ex
 
 common_objpfx=$1
-test_wrapper_env=$2
-run_program_env=$3
+test_wrapper_env=$3
+run_program_env=
 
 LIBPATH="$common_objpfx"