1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/testsuite/nsswitch/getent_r.sh
Tim Potter 75ebfc6f7a Merge from TNG.
(This used to be commit af5ded9f17)
2000-05-12 06:55:09 +00:00

36 lines
651 B
Bash
Executable File

#!/bin/sh
#
# Verify test output. Basically we check to see if all the files generated
# in /tmp by the get{pw,gr}ent_r.c and program are identical. If there is
# some problem with the re-entrancy of the code then the information in the
# two files will be different.
#
TYPE=$1
ID=$2
FILES="/tmp/${TYPE}_r-${ID}.out-*"
# Sort files
for file in $FILES; do
cat $file | sort > $file.sorted
done
# Diff files
SORTED="/tmp/${TYPE}_r-${ID}.out-*.sorted"
failed=0
for file1 in $SORTED; do
for file2 in $SORTED; do
if [ $file1 != $file2 ]; then
diff $file1 $file2
fi
done
done
# Clean up
rm -f $SORTED