Why change posix/globtest.sh?

Ulrich Drepper drepper@redhat.com
Tue Apr 18 19:38:00 GMT 2000


"H . J . Lu" <hjl@lucon.org> writes:

>  ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
>  ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER |
>  sort > $testout
> -eval echo ~$USER | cmp - $testout || result=1
> +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /.
> +if test ~/ = //; then
> +    echo / | cmp - $testout || result=1
> +else
> +    echo ~/ | cmp - $testout || result=1
> +fi
> 
> UIlrich, I believe you applied the patch at the wrong place. Could
> you please fix it?

Why should this be wrong?  Some shells expand ~/ for $HOME == / to //.
We expect / and therefore we have to have a special test.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list