${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
# Tilde expansion shouldn't match a file
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \