glibc/posix/globtest.sh
Ulrich Drepper e852e88944 Update.
1998-07-28  Ulrich Drepper  <drepper@cygnus.com>

	* math/libm-test.c (tgamma_test): Remove redundant tests.

1998-07-28 16:20  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/glob.c: Correct problems with */foo and GLOB_NOCHECK
	where foo does not exist in any of the subdirectories.
	Reported by Paul D. Smith <psmith@BayNetworks.COM>.

	* posix/globtest.sh: Add test for this bug.

1998-07-28  Mark Kettenis  <kettenis@phys.uva.nl>

	* io/sys/statfs.h: Fix typos.
	* io/sys/statvfs.h: Fix typos.

1998-07-28  Ulrich Drepper  <drepper@cygnus.com>

	* version.h (VERSION): Bump to 2.0.95.

	* math/Makefile (libm-calls): Remove w_gamma, add w_tgamma.
	* math/Versions [GLIBC_2.1]: Add tgamma, tgammaf, and tgammal.
	* math/libm-test.c: Split old gamma_test and move half of it in new
	function tgamma_test.
	* math/bits/mathcalls.h: Add declaration of tgamma.
	* sysdeps/libm-ieee754/k_standard.c: Change gamma errors into
	tgamma errors.
	* sysdeps/libm-ieee754/w_gamma.c: Remove lgamma compatibility code
	and rename to ...
	* sysdeps/libm-ieee754/w_tgamma.c: ... this.  New file.
	* sysdeps/libm-ieee754/w_gammaf.c: Remove lgammaf compatibility code
	and rename to ...
	* sysdeps/libm-ieee754/w_tgammaf.c: ... this.  New file.
	* sysdeps/libm-ieee754/w_gammal.c: Remove lgammal compatibility code
	and rename to ...
	* sysdeps/libm-ieee754/w_tgammal.c: ... this.  New file.
	* sysdeps/libm-ieee754/w_lgamma.c: Add gamma as weak alias.
	* sysdeps/libm-ieee754/w_lgammaf.c: Likewise.
	* sysdeps/libm-ieee754/w_lgammal.c: Likewise.

	* stgdio-common/printf-parse.h: Implement handling of j, t, and z
	modifiers.
	* stdio-common/vfprintf.c: Likewise.
	* stdio-common/vfscanf.c: Likewise.
	* manual/stdio.texi: Document new printf/scanf modifiers.

	* sysdeps/unix/sysv/linux/recvmsg.c: Remove alias __recvmsg.
	* sysdeps/unix/sysv/linux/sendmsg.c: Remove alias __sendmsg.

1998-07-28  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* sunrpc/Makefile (routines): Add clnt_unix and svc_unix.
	* sunrpc/Versions: Add new *unix_create functions.
	* sunrpc/clnt_gen.c: Add support for RPC over AF_UNIX.
	* sunrpc/clnt_unix.c: New, client side of RPC over AF_UNIX.
	* sunrpc/key_call.c: Use RPC over AF_UNIX for communication
	with keyserv daemon.
	* sunrpc/rpc/clnt.h: Add AF_UNIX based RPC function prototypes.
	* sunrpc/rpc/svc.h: Likewise.
	* sunrpc/svc_authux.c: Copy internal auth flavor if none is given.
	* sunrpc/svc_tcp.c: Fix typos.
	* sunrpc/svc_unix.c: New, server side of AF_UNIX based RPC.

	* nis/Makefile: Remove currently not working cache functions.
	* nis/Versions: Add __nisbind_* functions for rpc.nisd.
	* nis/nis_call.c: Rewrite binding to a NIS+ server to reuse
	CLIENT handles.
	* nis/nis_file.c: Fix memory leaks.
	* nis/nis_intern.h: Move internal structs from here ...
	* nis/rpcsvc/nislib.h: ... to here for NIS+ server and tools.
	* nis/nis_lookup.c: Try at first if last client handle works.
	* nis/nis_table.c: Likewise.
	* nis/nis_checkpoint.c: Adjust __do_niscall2 parameters.
	* nis/nis_mkdir.c: Likewise.
	* nis/nis_ping.c: Likewise.
	* nis/nis_rmdir.c: Likewise.
	* nis/nis_server.c: Likewise.
	* nis/nis_util.c: Likewise.
	* nis/nis_findserv.c (__nis_findfastest): Little optimization.

1998-07-28  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* stdlib/strtol.c (STRTOL_LONG_MAX): Correct typo in last patch -
	define as LONG_MAX.

1998-07-28 09:31  Ulrich Drepper  <drepper@cygnus.com>

	* nscd/connections.c (gr_send_answer): Deal with missing UIO_MAXIOV.
	Correct test whether writev send all data.
	* nscd/nscd_getgr_r.c (__nscd_getgr_r): Correct test whether readv
	received all data.

1998-07-28  Mark Kettenis  <kettenis@phys.uva.nl>

	* nscd/nscd_getgr_r.c (__nscd_getgr_r): Deal with missing UIO_MAXIOV.

1998-07-28  Mark Kettenis  <kettenis@phys.uva.nl>

	* sysdeps/mach/hurd/dl-sysdep.c (open_file): Change assert call to
	allow mode to be 0.
	(__xstat): New function.
	(__fxstat): New function.
	(_dl_sysdep_read_whole_file): Removed.  The implementation in
	`elf/dl-misc.c' now also works for the Hurd.
1998-07-28 16:26:04 +00:00

293 lines
7.3 KiB
Bash
Executable file

#! /bin/sh
common_objpfx=$1; shift
elf_objpfx=$1; shift
rtld_installed_name=$1; shift
# We have to find the libc and the NSS modules.
library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis
# Since we use `osrt' we must make sure to use the same locale everywhere.
LC_ALL=C
export LC_ALL
LANG=C
export LANG
# Create the arena
: ${TMPDIR=/tmp}
testdir=$TMPDIR/globtest-dir
testout=$TMPDIR/globtest-out
testout2=$TMPDIR/globtest-out2
trap 'rm -fr $testdir $testout $testout2' 1 2 3 15
rm -fr $testdir
mkdir $testdir
echo 1 > $testdir/file1
echo 2 > $testdir/file2
echo 3 > $testdir/-file3
echo 4 > $testdir/~file4
echo 5 > $testdir/.file5
echo 6 > $testdir/'*file6'
mkdir $testdir/dir1
mkdir $testdir/dir2
echo 1_1 > $testdir/dir1/file1_1
echo 1_2 > $testdir/dir1/file1_2
# Run some tests.
result=0
# Normal test
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`*file6'
`-file3'
`dir1'
`dir2'
`file1'
`file2'
`~file4'
EOF
# Don't let glob sort it
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -s "$testdir" "*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`*file6'
`-file3'
`dir1'
`dir2'
`file1'
`file2'
`~file4'
EOF
# Mark directories
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -m "$testdir" "*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`*file6'
`-file3'
`dir1/'
`dir2/'
`file1'
`file2'
`~file4'
EOF
# Find files starting with .
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -p "$testdir" "*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`*file6'
`-file3'
`.'
`..'
`.file5'
`dir1'
`dir2'
`file1'
`file2'
`~file4'
EOF
# Test braces
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -b "$testdir" "file{1,2}" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`file1'
`file2'
EOF
# Test NOCHECK
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -c "$testdir" "abc" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`abc'
EOF
# Test NOMAGIC without magic characters
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -g "$testdir" "abc" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`abc'
EOF
# Test NOMAGIC with magic characters
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -g "$testdir" "abc*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
# Test subdirs correctly
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
`dir1/file1_2'
EOF
# Test subdirs for invalid names
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/1" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
# Test subdirs with wildcard
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/*1_1" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
EOF
# Test subdirs with ?
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/*?_?" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
`dir1/file1_2'
EOF
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/file1_1" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
EOF
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*-/*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*-" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
# Test subdirs with ?
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "*/*?_?" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
`dir1/file1_2'
EOF
# Test tilde expansion
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -q -t "$testdir" "~" |
sort >$testout
echo ~ > $testout2
cmp $testout2 $testout || result=1
# Test tilde expansion with trailing slash
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -q -t "$testdir" "~/" |
sort > $testout
echo ~/ > $testout2
cmp $testout2 $testout || result=1
# Test tilde expansion with username
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER |
sort > $testout
eval echo ~$USER > $testout2
cmp $testout2 $testout || result=1
# Tilde expansion shouldn't match a file
#${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
#${common_objpfx}posix/globtest -t "$testdir" "~file4" |
#sort > $testout
#cat <<"EOF" | cmp - $testout || result=1
#GLOB_NOMATCH
#EOF
# Matching \** should only find *file6
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "\**" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`*file6'
EOF
# ... unless NOESCAPE is used, in which case it shouldn't match anything.
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -e "$testdir" "\**" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
# Try a recursive failed search
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -e "$testdir" "a*/*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
GLOB_NOMATCH
EOF
# Try multiple patterns (GLOB_APPEND)
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest "$testdir" "file1" "*/*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/file1_1'
`dir1/file1_2'
`file1'
EOF
# Try multiple patterns (GLOB_APPEND) with offset (GLOB_DOOFFS)
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -o "$testdir" "file1" "*/*" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`abc'
`dir1/file1_1'
`dir1/file1_2'
`file1'
EOF
# Test NOCHECK with non-existing file in subdir.
${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}posix/globtest -c "$testdir" "*/blahblah" |
sort > $testout
cat <<"EOF" | cmp - $testout || result=1
`dir1/blahblah'
`dir2/blahblah'
EOF
if test $result -eq 0; then
rm -fr $testdir $testout
fi
exit $result
# Preserve executable bits for this shell script.
Local Variables:
eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
eval:(make-local-variable 'file-mode)
eval:(setq file-mode (file-modes (buffer-file-name)))
eval:(make-local-variable 'after-save-hook)
eval:(add-hook 'after-save-hook 'frobme)
End: